This commit is contained in:
yanran200730
2022-06-17 16:24:32 +08:00
parent b383a89d9c
commit 5371349eaa
2 changed files with 4 additions and 12 deletions

View File

@@ -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
})

View File

@@ -23,8 +23,8 @@ instance.interceptors.request.use(config => {
})
instance.interceptors.response.use(res => {
if (res.data) {
uni.hideLoading()
if (res.data) {
if (res.data.access_token) {
return res.data
}