|
|
@ -68,11 +68,13 @@ |
|
|
|
that.isRest = true; |
|
|
|
that.isRest = true; |
|
|
|
clearInterval(timer); |
|
|
|
clearInterval(timer); |
|
|
|
that.$forceUpdate(); |
|
|
|
that.$forceUpdate(); |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
console.log('that.yuyinInfo:' +JSON.stringify(that.yuyinInfo)); |
|
|
|
console.log('that.yuyinInfo:' +JSON.stringify(that.yuyinInfo)); |
|
|
|
console.log(that.yuyinInfo.voice) |
|
|
|
console.log(that.yuyinInfo.voice) |
|
|
|
console.log(that.yuyinInfo.voiceTime) |
|
|
|
console.log(that.yuyinInfo.voiceTime) |
|
|
|
}); |
|
|
|
}); |
|
|
|
innerAudioContext.onEnded(res=>{ |
|
|
|
innerAudioContext.onEnded(res=>{ |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
that.isPlay = false |
|
|
|
that.isPlay = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
innerAudioContext.onTimeUpdate(res=>{ |
|
|
|
innerAudioContext.onTimeUpdate(res=>{ |
|
|
@ -122,6 +124,7 @@ |
|
|
|
that.show=true |
|
|
|
that.show=true |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
that.show=false |
|
|
|
that.show=false |
|
|
|
|
|
|
|
|
|
|
|
that.yuyinInfo.voice = "" |
|
|
|
that.yuyinInfo.voice = "" |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(0); |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(0); |
|
|
|
that.yuyinInfo.voiceTimes = 0; |
|
|
|
that.yuyinInfo.voiceTimes = 0; |
|
|
@ -155,6 +158,9 @@ |
|
|
|
if(innerAudioContext){ |
|
|
|
if(innerAudioContext){ |
|
|
|
console.log(innerAudioContext.src) |
|
|
|
console.log(innerAudioContext.src) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: "播放中" |
|
|
|
|
|
|
|
}) |
|
|
|
innerAudioContext.src = that.yuyinInfo.voice; |
|
|
|
innerAudioContext.src = that.yuyinInfo.voice; |
|
|
|
innerAudioContext.play(); |
|
|
|
innerAudioContext.play(); |
|
|
|
that.isPlay = true; |
|
|
|
that.isPlay = true; |
|
|
@ -178,6 +184,9 @@ |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(0); |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(0); |
|
|
|
that.isPlays = true; |
|
|
|
that.isPlays = true; |
|
|
|
clearInterval(timer) |
|
|
|
clearInterval(timer) |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: "录音中" |
|
|
|
|
|
|
|
}) |
|
|
|
timer = setInterval(()=>{ |
|
|
|
timer = setInterval(()=>{ |
|
|
|
that.count++ |
|
|
|
that.count++ |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(that.count) |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(that.count) |
|
|
@ -203,6 +212,9 @@ |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(that.count) |
|
|
|
that.yuyinInfo.voiceTime = that.formatFun(that.count) |
|
|
|
that.yuyinInfo.voiceTimes = that.count |
|
|
|
that.yuyinInfo.voiceTimes = that.count |
|
|
|
},1000) |
|
|
|
},1000) |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: "录音中" |
|
|
|
|
|
|
|
}) |
|
|
|
recorderManager.start({ |
|
|
|
recorderManager.start({ |
|
|
|
format: "mp3" |
|
|
|
format: "mp3" |
|
|
|
}) |
|
|
|
}) |
|
|
|