diff --git a/.env.development.yh b/.env.development.yh index 193ce295..95d4857d 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -4,8 +4,8 @@ ENV = 'development.yh' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' +VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' # VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603' diff --git a/src/pages/sparring/components/touchBtn.vue b/src/pages/sparring/components/touchBtn.vue index c01eb183..0873009e 100644 --- a/src/pages/sparring/components/touchBtn.vue +++ b/src/pages/sparring/components/touchBtn.vue @@ -12,8 +12,7 @@ {{'语音对话'}} --> - + @@ -130,6 +129,7 @@ const isStartNum = ref(0); const isStopNum = ref(0); const isGettingPermission = ref(false) + const isHandleClosed = ref(false) const initRecord = () => { recordObjCom.value = uni.getRecorderManager(); unref(recordObjCom)?.onStop((res, duration) => { @@ -173,10 +173,10 @@ setTimeout(() => { startFlag.value = 2; }, 1000); - setRecordTime() - if (isStopNum.value === isStartNum.value) { + if ((isStopNum.value === isStartNum.value) || isHandleClosed.value) { stopRecord(); } else { + setRecordTime() showTalkingModel.value = true; } }); @@ -206,6 +206,7 @@ unref(recordObjCom).start({ format: formatType.value }); + // showTalkingModel.value = true; }; const stopRecord = () => { @@ -216,31 +217,31 @@ isGettingPermission.value = false }, 1000) console.log(10, '验证停止方法存在') - closeModel(); + closeModel(); unref(recordObjCom).stop(); } else { console.log(11, '验证停止方法不存在') isGettingPermission.value = false - setTimeout(() => { closeModel(); - }, 300) } } catch { console.log(12, '验证错误') isGettingPermission.value = false - closeModel(); + closeModel(); } }; const closeModel = (cb = () => {}) => { console.log(99, '关闭弹窗') isStopNum.value = isStartNum.value; - setTimeout(() => { - isTalking.value = false; - }, 800); + isHandleClosed.value = true setTimeout(() => { showTalkingModel.value = false; cb && cb(); - }, 350); + }, 300); + setTimeout(() => { + isTalking.value = false; + isHandleClosed.value = false + }, 1000); }; // #endif //#ifndef APP-PLUS @@ -334,7 +335,6 @@ }); return false } else if (_state === 'not determined') { - // startRecord() return true } else { return true @@ -383,7 +383,6 @@ touchY.value = obj.changedTouches[0].pageY; baseY.value = obj.currentTarget.offsetTop; //#ifdef APP-PLUS - // canStart.value = false startRecord(); // #endif setTimeout(() => { diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 590dc959..15be2ae5 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -11,14 +11,9 @@ 内容由AI生成 - + @@ -28,16 +23,10 @@ {{ detailInfo.chaName }} {{ detailInfo.chaAge }}岁 - - + + @@ -74,45 +63,24 @@ -请点击下方按钮开始{{ detailInfo.traInterTypDesc }} - + 结束陪练 - + - + - - + + {{ detailInfo.traInterTypDesc }} @@ -125,27 +93,62 @@