diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index fbd81e01..c6120ebf 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -174,7 +174,7 @@ }, record () { - this.duration = 0 + this.time = 60 this.recorder = Recorder({ type: 'mp3', sampleRate: 16000, @@ -201,16 +201,6 @@ }, 1000) }, - blobToDataURI(blob) { - return new Promise((resolve) => { - var reader = new FileReader() - reader.readAsDataURL(blob) - reader.onload = function (e) { - resolve(e.target.result) - } - }) - }, - play (url, index) { if (this.currIndex === index) { this.innerAudioContext.destroy() @@ -275,11 +265,13 @@ this.isShow = false }).catch(() => { this.isShow = false + uni.hideLoading() }) } else { this.isShow = false } }).catch(() => { + uni.hideLoading() this.isShow = false }) diff --git a/src/common/axios.js b/src/common/axios.js index 78b032fa..40ecdda7 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -23,8 +23,8 @@ instance.interceptors.request.use(config => { }) instance.interceptors.response.use(res => { + uni.hideLoading() if (res.data) { - uni.hideLoading() if (res.data.access_token) { return res.data }