From 77b4a7050f198c0617f0fa022823e58638bc58fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 9 Dec 2025 08:45:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20:=20=E5=A3=B0=E9=9F=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sparring/components/question.vue | 43 ++++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue index c6d236b9..7ced6086 100644 --- a/src/pages/sparring/components/question.vue +++ b/src/pages/sparring/components/question.vue @@ -13,7 +13,7 @@ - + { pauseVoice() }) + // 重播 + const restartPlay = () => { + if (itemVoice.value) { + emit('changePlay', ''); + emit('changePlay', unref(dataInfo)?.id); + setTimeout(() => { + talkUserVoiceObj.value.src = itemVoice.value; + talkUserVoiceObj.value.seek(0); + talkUserVoiceObj.value.play(); + }, 100); + } else { + playVoice(); + } + }; const pauseVoice = () => { if (!talkUserVoiceObj.value) return talkUserVoiceObj.value.pause() @@ -92,7 +106,13 @@ } const playVoice = () => { emit('changePlay', unref(dataInfo)?.id) + if(isTesting.value){ + talkUserVoiceObj.value.volume = 1 + restartPlay() + return + } if (talkUserVoiceObj.value && talkUserVoiceObj.value.src) { + talkUserVoiceObj.value.volume = 1 setTimeout(() => { talkUserVoiceObj.value.src = itemVoice.value talkUserVoiceObj.value.play() @@ -101,6 +121,7 @@ return } else { talkUserVoiceObj.value.src = '' + talkUserVoiceObj.value.volume = 1 if (unref(dataInfo).talkingVoice) { setTimeout(() => { talkUserVoiceObj.value.src = itemVoice.value @@ -140,12 +161,12 @@ talkUserVoiceObj.value.sessionCategory = 'soloAmbient' //#ifdef APP-PLUS // 安卓端 须播放一次,不然再次播放会没有声音 - // if (IsAndEnv) { - // isTesting.value = true - // talkUserVoiceObj.value.volume = 0 - // talkUserVoiceObj.value.play() - // // talkUserVoiceObj.value.pause() - // } + if (IsAndEnv) { + isTesting.value = true + talkUserVoiceObj.value.volume = 0 + talkUserVoiceObj.value.play() + // talkUserVoiceObj.value.pause() + } // #endif // setTimeout(() => { // setVoiceTime(0) @@ -153,16 +174,16 @@ } const isTesting = ref(false) const setVoiceTime = (sum) => { - sum += 1 + let _sum = sum + 1 if (Math.ceil(talkUserVoiceObj.value.duration) > 0) { voiceTime.value = (Math.ceil(talkUserVoiceObj.value.duration) || 1) + 's' } else { - if (sum === 20) { - voiceTime.value = (props.dataInfo.voiceTime|| 0) + 's' + if (_sum === 25) { + voiceTime.value = (props.dataInfo.voiceTime|| 1) + 's' return } setTimeout(() => { - setVoiceTime(sum) + setVoiceTime(_sum) }, 200) } } From 86dc8bbe786307211060212d340d1f634064d6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 9 Dec 2025 09:19:10 +0800 Subject: [PATCH 2/3] fix: bug --- .env.development.yh | 6 +++--- src/pages/sparring/tip.vue | 36 ++++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index ef3a38f8..2b8b529b 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -2,13 +2,13 @@ ENV = 'development.yh' # 'development.yh' -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' +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.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' +# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603' # VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' # VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.158:9601' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602' diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 46d649c7..8eb377f0 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -69,7 +69,12 @@ {{ detailInfo.sceneDesc }} - + + + -请点击下方按钮开始{{ detailInfo.traInterTypDesc }} + + + { - overNow(() => { - reconcatNum.value += 1; - common.redirectTo(`/pages/index/dialog`); - }); - }) - .finally(() => { - showModelComfirm.value = false; - }); + reconcatNum.value += 1; + // common + // .show('提示信息', '网络环境不稳定,请重试!', false, '', '确认') + // .then((res) => { + // overNow(() => { + // reconcatNum.value += 1; + // common.redirectTo(`/pages/index/dialog`); + // }); + // }) + // .finally(() => { + // showModelComfirm.value = false; + // }); }); unref(SocketObj).on('message', (res) => { const { rtnCode, body, commond } = JSON.parse(res.data); @@ -874,6 +881,11 @@ .talking-box { padding-top: 24rpx; + .tip-text{ + color: #7295cb; + text-align: center; + font-size: 29rpx; + } } } From 121a2e06c080856b4672eac357fbb9650e3fdaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 9 Dec 2025 09:32:17 +0800 Subject: [PATCH 3/3] fix; bug --- src/pages/sparring/detail.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue index 99726c28..368bcbf8 100644 --- a/src/pages/sparring/detail.vue +++ b/src/pages/sparring/detail.vue @@ -63,14 +63,13 @@ @click="previewFile(item)"> {{ item.dataName }}.{{ item.dataSuffix }} - - - + 去练习 去考试 + + 去考试 + @@ -362,6 +361,9 @@ margin-left: 36rpx; background: #06f; color: #fff; + &.no-margin{ + margin-left: 0; + } } } }