diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 9e44f27c..69f1d7ca 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -99,11 +99,11 @@ const initRecord = () => { unref(recordObjCom)?.onStop((res, duration)=>{ audioPath.value = res.tempFilePath showTalkingModel.value = false - if(startFlag.value !== 2){ - common.msg('说话时间太短,没有听清!') - return - } if(!isOut.value){ + if(startFlag.value !== 2){ + common.msg('说话时间太短,没有听清!') + return + } emit('uploadVoice', audioPath.value) } }) @@ -127,7 +127,13 @@ const startRecord = () => { const stopRecord = () => { if(unref(recordObjCom).stop){ - unref(recordObjCom)?.stop?.() + try{ + unref(recordObjCom)?.stop() + }catch{ + showTalkingModel.value = false + } + }else{ + showTalkingModel.value = false } } // #endif diff --git a/src/pages/index/components/talking-item.vue b/src/pages/index/components/talking-item.vue index 9b13471c..2a17752d 100644 --- a/src/pages/index/components/talking-item.vue +++ b/src/pages/index/components/talking-item.vue @@ -46,9 +46,10 @@ } -