From d4eb28777526adafffd7ce94e5928a2a2c69d984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 15:55:56 +0800 Subject: [PATCH] fix: bug --- .env.development.yh | 4 ++-- .../points-and-badge/usePointsAndBadge.js | 18 +++++++++++++++++- src/pages/sparring/components/question.vue | 3 +++ src/pages/sparring/tip.vue | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index 5166041e..3934d26d 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -4,8 +4,8 @@ ENV = 'development.yh' VITE_APP_BASE_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.91:9786' # 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_TRAAPP = 'http://25.64.32.154:9601' +# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' diff --git a/src/components/points-and-badge/usePointsAndBadge.js b/src/components/points-and-badge/usePointsAndBadge.js index 94bd3f10..1a10dd15 100644 --- a/src/components/points-and-badge/usePointsAndBadge.js +++ b/src/components/points-and-badge/usePointsAndBadge.js @@ -105,7 +105,23 @@ export default function usePointsAndBadge() { } console.log('调用积分接口', res); console.log('pointsRefpointsRef', pointsRef.value); - + // 06AI问答 不弹出积分窗口 + if(type=== '06'){ + if (badgesList.length > 0) { + nextTick(() => { + setTimeout(() => { + badgeRef.value.open(pointsList, badgesList, () => { + badgeRef.value.close() + complete(true, '', res); + }); + }, pop_up_time); + }); + }else{ + complete(true, '', res); + } + return + } + // 弹出积分窗口 pointsRef.value.open(res.body.points, res.body.pointsBadges, (status, pointsList, badgesList) => { pointsRef.value.close() if (badgesList.length > 0) { diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue index a5e2f35c..d8835cc4 100644 --- a/src/pages/sparring/components/question.vue +++ b/src/pages/sparring/components/question.vue @@ -105,6 +105,7 @@ import { onUnload } from '@dcloudio/uni-app'; const initVoice = () => { talkVoiceObj.value = uni.createInnerAudioContext() talkVoiceObj.value.onPause(()=>{ + talkVoiceObj.value.volume = 1 }) talkVoiceObj.value.onPlay(()=>{ if(isTesting.value){ @@ -115,6 +116,7 @@ import { onUnload } from '@dcloudio/uni-app'; talkVoiceObj.value.onEnded(()=>{ emit('changePlay', '') talkVoiceObj.value.src = '' + talkVoiceObj.value.volume = 1 }) talkVoiceObj.value.onError(()=>{ talkVoiceObj.value.src = '' @@ -122,6 +124,7 @@ import { onUnload } from '@dcloudio/uni-app'; itemVoice.value = unref(dataInfo).talkingVoice talkVoiceObj.value.src = itemVoice.value isTesting.value = true + talkVoiceObj.value.volume = 0 talkVoiceObj.value.play() talkVoiceObj.value.pause() setTimeout(()=>{ diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 2059550b..37ebfe54 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -418,6 +418,7 @@ }).then(res=>{ watchFlag.value = 1; socketStore?.closeSocket(); + changePlayItemId('') pointAndBadgesRun(talkingType.value === '01'? '07': '08', null, ()=>{ common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':'')) })