From 401c6c2e42e259404314c70fdb75844d64fac5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 4 Dec 2025 17:05:03 +0800 Subject: [PATCH 01/11] fix: bug --- .env.development | 2 +- src/pages/sparring/tip.vue | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.env.development b/.env.development index 4e467440..646bd12a 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' # VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 38bd37a1..f65bcb14 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -329,7 +329,9 @@ console.log(body); console.log(talkingList.value[talkingList.value.length - 1].isLoading); if (talkingList.value.length > 0 && talkingList.value[talkingList.value.length - 1].isLoading) { - talkingList.value.pop(); + talkingList.value = talkingList.value.filter(t => { + return !(t.type === 'question' && t.isLoading) + }) } // seqNo.value = body.seqNo; // touchBtnCallBack.value && touchBtnCallBack.value(); @@ -364,7 +366,10 @@ if (body.event === 'start') { answerIsOver.value = false; answerText.value = ''; - talkingList.value.pop(); + // talkingList.value.pop(); + talkingList.value = talkingList.value.filter(t => { + return !(t.type === 'answer' && t.isLoading) + }) talkingList.value.push({ type: 'answer', talkingText: answerText.value, @@ -407,12 +412,12 @@ return; } if (commond === 'ASK-OVER') { - console.log(body ); + console.log(body); console.log('陪练已结束,去结果页面!'); - common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value - + '&execId=' + execId.value - + '&type=' + talkingType.value - + '&isPreview=' + (isPreview.value ? '1' : '')) + common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value + + '&execId=' + execId.value + + '&type=' + talkingType.value + + '&isPreview=' + (isPreview.value ? '1' : '')) return; } } else { From b38cb9ecf5807e98dbf57f8ca294ae15229ad50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 4 Dec 2025 18:58:05 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sparring/tip.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index f65bcb14..af43dd41 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -333,6 +333,8 @@ return !(t.type === 'question' && t.isLoading) }) } + // 设为提问中状态 + answerIsOver.value = false // seqNo.value = body.seqNo; // touchBtnCallBack.value && touchBtnCallBack.value(); // touchBtnCallBack.value = null; From a8f46124c7f03d6385ddd5ed64675f397c48c9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 4 Dec 2025 19:11:45 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sparring/tip.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index af43dd41..d17f119b 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -199,6 +199,8 @@ isLoading: true }); scrollToBottomNow(); + // 设为提问中状态 + answerIsOver.value = false commonUploadVoiceFile(voicePath, '/trapractice/traPartnerChat/voiceTrans', {}) .then((_res) => { if (!!(_res.body.transContent || '').trim()) { @@ -215,6 +217,7 @@ body: askData.value }); } else { + answerIsOver.value = true talkingList.value.pop(); uni.showToast({ title: '未识别到文字', @@ -224,6 +227,7 @@ } }) .catch((err) => { + answerIsOver.value = true talkingList.value.pop(); uni.showToast({ title: '系统异常,请联系管理员', @@ -333,8 +337,6 @@ return !(t.type === 'question' && t.isLoading) }) } - // 设为提问中状态 - answerIsOver.value = false // seqNo.value = body.seqNo; // touchBtnCallBack.value && touchBtnCallBack.value(); // touchBtnCallBack.value = null; From bca24af5f7930e372a8dcee83c9b5f18151fb069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 09:05:42 +0800 Subject: [PATCH 04/11] fix : bug --- src/api/socket.js | 4 ++-- src/pages.json | 1 + src/pages/index/dialog.vue | 3 +++ src/pages/sparring/tip.vue | 13 ++++++++++++- src/pagesOther.json | 1 + 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/api/socket.js b/src/api/socket.js index 0869f8d8..2b304f90 100644 --- a/src/api/socket.js +++ b/src/api/socket.js @@ -86,7 +86,7 @@ export default class WebSocketUtil { // console.log('WebSocket连接已关闭', res); clearInterval(this.heartbeatTimer); // 清除心跳计时器 this.triggerEvent('close', res); // 触发连接关闭事件 - this.tryReconnect(); // 尝试重连 + // this.tryReconnect(); // 尝试重连 }); // 监听WebSocket错误事件 @@ -106,7 +106,7 @@ export default class WebSocketUtil { */ on(event, callback) { if (this.callbacks[event]) { - this.callbacks[event].push(callback); + this.callbacks[event] = [callback]; } return this; } diff --git a/src/pages.json b/src/pages.json index 62ee516d..8493c7fb 100644 --- a/src/pages.json +++ b/src/pages.json @@ -589,6 +589,7 @@ "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8", "navigationStyle": "custom", + "screenOrientation": "portrait", "app-plus": { "titleView": false, "bounce": "none", diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index 4d0f6bc4..c5bdba65 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -791,6 +791,9 @@ initsocketTask(); }; onLoad(() => { + //#ifdef APP-PLUS + plus.screen.lockOrientation('portrait-primary') + // #endif changeAppHeightBottom(); if (!common.isLogin()) { common.navigateTo('/pages/login/login'); diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index d17f119b..6526e28a 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -104,6 +104,7 @@ onShow, onLoad, onUnload, + onLaunch, onBackPress } from '@dcloudio/uni-app'; import common from '@/common/common'; @@ -311,6 +312,7 @@ let _id = new Date().getTime() + 'id'; if (rtnCode === '0000') { if (commond === 'ASK-OPEN') { + console.log('ASK-OPEN!',body) // 新连接 sendMessage({ commond: 'ASK-START', @@ -324,7 +326,7 @@ return; } if (commond === 'ASK-START') { - // console.log('开启对话!') + console.log('开启对话!',body) execId.value = body.execId; return; } @@ -477,8 +479,13 @@ talkingType.value = params.type; isPreview.value = params.isPreview === '1' getDetailInfo() + console.log('onLoad') + //#ifdef APP-PLUS + plus.screen.lockOrientation('portrait-primary') + // #endif }); onUnload(() => { + console.log('onUnload') watchFlag.value = 1; sendMessage({ commond: 'ASK-STOP', @@ -487,7 +494,11 @@ } }) socketStore?.closeSocket(); + execId.value = '' }); + onLaunch(() => { + console.log('onLaunch') + }) onMounted(() => { // getDetailInfo() }) diff --git a/src/pagesOther.json b/src/pagesOther.json index 3b5f6d23..26d99725 100644 --- a/src/pagesOther.json +++ b/src/pagesOther.json @@ -103,6 +103,7 @@ "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8", "navigationStyle": "custom", + "screenOrientation": "portrait", "app-plus": { "titleView": false, "bounce": "none", From 77c9e6b9bef2f7dd2d4253cfa3871ba0d0a4302c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 09:17:26 +0800 Subject: [PATCH 05/11] fix :bug --- src/pages/sparring/tip.vue | 63 ++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 6526e28a..9bb0f7ec 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -200,8 +200,8 @@ isLoading: true }); scrollToBottomNow(); - // 设为提问中状态 - answerIsOver.value = false + // 设为提问中状态 + answerIsOver.value = false commonUploadVoiceFile(voicePath, '/trapractice/traPartnerChat/voiceTrans', {}) .then((_res) => { if (!!(_res.body.transContent || '').trim()) { @@ -296,8 +296,10 @@ common .show('提示信息', '网络环境不稳定,请重试!', false, '', '确认') .then((res) => { - reconcatNum.value += 1; - common.redirectTo(`/pages/index/dialog`); + overNow(()=>{ + reconcatNum.value += 1; + common.redirectTo(`/pages/index/dialog`); + }) }) .finally(() => { showModelComfirm.value = false; @@ -312,7 +314,7 @@ let _id = new Date().getTime() + 'id'; if (rtnCode === '0000') { if (commond === 'ASK-OPEN') { - console.log('ASK-OPEN!',body) + console.log('ASK-OPEN!', body) // 新连接 sendMessage({ commond: 'ASK-START', @@ -326,7 +328,7 @@ return; } if (commond === 'ASK-START') { - console.log('开启对话!',body) + console.log('开启对话!', body) execId.value = body.execId; return; } @@ -444,28 +446,35 @@ const overTalking = () => { common.show('提示', '确定结束陪练吗?').then(res => { if (res) { - partnerChatReportTrigger({ - execId: execId.value, - traId: traId.value, - talkingType: isPreview.value ? 'preview' : 'practice' - }).then(res => { - watchFlag.value = 1; - sendMessage({ - commond: 'ASK-STOP', - body: { - execId: execId.value || '' - } - }) - socketStore?.closeSocket(); - changePlayItemId('') - common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value + '&execId=' + execId - .value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ? '1' : '')) - // pointAndBadgesRun(talkingType.value === '01'? '07': '08', '', ()=>{ - // common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':'')) - // }) - }) + overNow() } }) + } + const overNow = (cb= ()=>{}) => { + partnerChatReportTrigger({ + execId: execId.value, + traId: traId.value, + talkingType: isPreview.value ? 'preview' : 'practice' + }).then(res => { + watchFlag.value = 1; + sendMessage({ + commond: 'ASK-STOP', + body: { + execId: execId.value || '' + } + }) + socketStore?.closeSocket(); + changePlayItemId('') + common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value + '&execId=' + execId + .value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ? '1' : '')) + // pointAndBadgesRun(talkingType.value === '01'? '07': '08', '', ()=>{ + // common.navigateTo('/pages/sparring/result?isOver=1&traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':'')) + // }) + }).catch(()=>{ + cb() + }) + + } const sendMessage = (data) => { unref(SocketObj).send(data); @@ -481,7 +490,7 @@ getDetailInfo() console.log('onLoad') //#ifdef APP-PLUS - plus.screen.lockOrientation('portrait-primary') + plus.screen.lockOrientation('portrait-primary') // #endif }); onUnload(() => { From 616efc63c9d2a6282ddb053425005a133e330cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 09:18:55 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix=20=EF=BC=9Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.vue b/src/App.vue index 63d8cafc..5b1d72d2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,6 +7,9 @@ animationType: 'slide-in-bottom' }); }); + //#ifdef APP-PLUS + plus.screen.lockOrientation('portrait-primary') + // #endif }, onShow: function () { From 1deecae63fb031e175bfc673881e5ceeaf87b0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 11:04:20 +0800 Subject: [PATCH 07/11] =?UTF-8?q?fix=EF=BC=9A=20=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E5=BD=95=E9=9F=B3=E6=97=B6=E9=95=BF=E8=8E=B7=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development.yh | 4 ++-- src/pages/course/components/talkingItem.vue | 2 +- src/pages/course/components/touchBtn.vue | 20 +++++++++++++++++++- src/pages/course/study.vue | 5 +++-- src/pages/index/components/question.vue | 2 +- src/pages/index/dialog.vue | 5 +++-- src/pages/sparring/components/question.vue | 12 ++++++++---- src/pages/sparring/components/touchBtn.vue | 16 +++++++++++++++- src/pages/sparring/tip.vue | 5 +++-- 9 files changed, 55 insertions(+), 16 deletions(-) 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/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 5cced8fb..b5899afa 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -694,7 +694,7 @@ voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 0) + 's'; } else { if (sum === 100) { - voiceTime.value = 0 + 's'; + voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's'; return; } setTimeout(() => { diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 3d1a24b3..3bd0a45c 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -174,6 +174,7 @@ const initRecord = () => { recordObjCom.value = uni.getRecorderManager(); unref(recordObjCom)?.onStop((res, duration) => { + isRecording.value = false if(isGettingPermission.value){ isGettingPermission.value = false return @@ -196,13 +197,20 @@ }); } else { closeModel(); - emit('uploadVoice', audioPath.value); + emit('uploadVoice', audioPath.value, recordTime.value); } } else { closeModel(); } }); unref(recordObjCom).onStart(() => { + isRecording.value = true + recordTime.value = 0 + setRecordTime() + if(isGettingPermission.value){ + isGettingPermission.value = false + return + } startFlag.value = 1; setTimeout(() => { startFlag.value = 2; @@ -219,6 +227,16 @@ } }); }; + const setRecordTime = () => { + setTimeout(()=>{ + if(isRecording.value){ + recordTime.value += 1 + setRecordTime() + } + },1000) + } + const isRecording = ref(false) + const recordTime = ref(0) const startFlag = ref(1); // const canStart = ref(true) const startRecord = () => { diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 9413450c..62073b71 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -839,7 +839,7 @@ const testAnswer = computed(() => { let _num = _arr.map(t => [1, 2, 6].indexOf(Number(t.type)) >= 0).filter(t => !!t) return _num.length < 5 }) -const uploadRecordNow = voicePath => { +const uploadRecordNow = (voicePath, voiceTime) => { if (!testAnswer.value) { common.msg('每个问题最多连续发送五次答案!') return @@ -911,7 +911,8 @@ const uploadRecordNow = voicePath => { userInfo: { ...choiceTeacherInfo.value }, - id: _id + id: _id, + voiceTime: voiceTime } } else { return t diff --git a/src/pages/index/components/question.vue b/src/pages/index/components/question.vue index d8623d81..1d59196a 100644 --- a/src/pages/index/components/question.vue +++ b/src/pages/index/components/question.vue @@ -131,7 +131,7 @@ import { onUnload } from '@dcloudio/uni-app'; voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1 ) + 's' }else{ if(sum === 20) { - voiceTime.value = 0 + 's' + voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's'; return } setTimeout(()=>{ diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index c5bdba65..5c60a1ab 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -662,7 +662,7 @@ submitAnswerNow(item); }; // 发送语音 - const uploadRecordNow = (voicePath) => { + const uploadRecordNow = (voicePath, voiceTime) => { // /traask/traAskchat/voiceTrans //#ifndef APP-PLUS // h5 假数据 @@ -683,7 +683,8 @@ intrctContent: _res.body.transContent, bucketKey: _res.body.fileId, ossFileAddr: _res.body.ossFileAddr, - talkingVoice: voicePath + talkingVoice: voicePath, + voiceTime: voiceTime }; sendMessage({ commond: 'ASK', diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue index d9b1e7d4..05f34268 100644 --- a/src/pages/sparring/components/question.vue +++ b/src/pages/sparring/components/question.vue @@ -130,8 +130,12 @@ talkUserVoiceObj.value.onError(() => { talkUserVoiceObj.value.src = '' }) + talkUserVoiceObj.value.onCanplay(() => { + setVoiceTime(0) + }) itemVoice.value = unref(dataInfo).talkingVoice talkUserVoiceObj.value.src = itemVoice.value + talkUserVoiceObj.value.sessionCategory = 'soloAmbient' //#ifdef APP-PLUS // 安卓端 须播放一次,不然再次播放会没有声音 if (IsAndEnv) { @@ -141,9 +145,9 @@ // talkUserVoiceObj.value.pause() } // #endif - setTimeout(() => { - setVoiceTime(0) - }, 100) + // setTimeout(() => { + // setVoiceTime(0) + // }, 100) } const isTesting = ref(false) const setVoiceTime = (sum) => { @@ -152,7 +156,7 @@ voiceTime.value = (Math.ceil(talkUserVoiceObj.value.duration) || 1) + 's' } else { if (sum === 20) { - voiceTime.value = 0 + 's' + voiceTime.value = (props.dataInfo.voiceTime|| 0) + 's' return } setTimeout(() => { diff --git a/src/pages/sparring/components/touchBtn.vue b/src/pages/sparring/components/touchBtn.vue index dd26ed33..2598f6df 100644 --- a/src/pages/sparring/components/touchBtn.vue +++ b/src/pages/sparring/components/touchBtn.vue @@ -127,6 +127,7 @@ const initRecord = () => { recordObjCom.value = uni.getRecorderManager(); unref(recordObjCom)?.onStop((res, duration) => { + isRecording.value = false if(isGettingPermission.value){ isGettingPermission.value = false return @@ -141,13 +142,16 @@ }); } else { closeModel(); - emit('uploadVoice', audioPath.value); + emit('uploadVoice', audioPath.value, recordTime.value); } } else { closeModel(); } }); unref(recordObjCom).onStart(() => { + isRecording.value = true + recordTime.value = 0 + setRecordTime() if(isGettingPermission.value){ stopRecord(); return @@ -167,6 +171,16 @@ } }); }; + const setRecordTime = () => { + setTimeout(()=>{ + if(isRecording.value){ + recordTime.value += 1 + setRecordTime() + } + },1000) + } + const isRecording = ref(false) + const recordTime = ref(0) const startFlag = ref(1); const startRecord = () => { isStartNum.value += 1; diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index 9bb0f7ec..ea3bc1bb 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -189,7 +189,7 @@ }, time); }); }; - const uploadRecordNow = (voicePath) => { + const uploadRecordNow = (voicePath, voiceTime) => { //#ifndef APP-PLUS // h5 假数据 // #endif @@ -211,7 +211,8 @@ intrctContent: _res.body.transContent, fileId: _res.body.fileId, ossFileAddr: _res.body.ossFileAddr, - talkingVoice: voicePath + talkingVoice: voicePath, + voiceTime: voiceTime }; sendMessage({ commond: 'ASK', From f023d244f94674e4058d47baa6d37b109a41976f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 12:11:52 +0800 Subject: [PATCH 08/11] fix: bug --- src/components/markdown-preview/markdown-preview.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/markdown-preview/markdown-preview.vue b/src/components/markdown-preview/markdown-preview.vue index 0ce9ed50..27615aff 100644 --- a/src/components/markdown-preview/markdown-preview.vue +++ b/src/components/markdown-preview/markdown-preview.vue @@ -24,7 +24,8 @@ watch:{ mdString: { handler(val){ - this.contentHtml = this.parseContent(val) + let _text = val.replace(//g,'>') + this.contentHtml = this.parseContent(_text) }, deep: true, immediate: true From 62f335270fe5137ac6a56125fef6f291ed453f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 13:56:54 +0800 Subject: [PATCH 09/11] =?UTF-8?q?fix=EF=BC=9B=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/analytics/study.vue | 59 ++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/src/pages/analytics/study.vue b/src/pages/analytics/study.vue index 42a3cf6f..64a62a9a 100644 --- a/src/pages/analytics/study.vue +++ b/src/pages/analytics/study.vue @@ -107,36 +107,36 @@ - + - + {{item.title}} {{item.content}} - + - + {{item.title}} {{item.content}} - + - + {{suggestObj.content}} - + - + 暂无数据 @@ -225,26 +225,45 @@ } } const loading = ref(false) + const loading1 = ref(false) + const loading2 = ref(false) + const loading3 = ref(false) + const loading4 = ref(false) const getInfoNow = async (params) => { loading.value = true - try { - let _res1 = await queryStudyStatistics(params) + loading2.value = true + loading1.value = true + loading3.value = true + queryStudyStatistics(params).then(_res1 => { statisticsObj.value = { ..._res1.body } - let _res2 = await queryDimesionInfo(params) + loading.value = false + }).catch(() => { + loading.value = false + }) + queryDimesionInfo(params).then(_res2 => { dimesionList.value = [..._res2.body] - let _res3 = await queryHabitInfo(params) + loading1.value = false + }).catch(() => { + loading1.value = false + }) + queryHabitInfo(params).then(_res3 => { studyList.value = [..._res3.body] - let _res4 = await querySuggestInfo(params) + loading2.value = false + }).catch(() => { + loading2.value = false + }) + querySuggestInfo(params).then(_res4 => { if (_res4.body && _res4.body.length > 0) { suggestObj.value = { ..._res4.body[0] } } - } catch {} finally { - loading.value = false - } + loading3.value = false + }).catch(() => { + loading3.value = false + }) } // 跳转 课程详情 const toCourseDetail = item => { @@ -263,9 +282,12 @@ } const getCrsListNow = () => { + loading4.value = true queryRecmdCrsInfo().then(res => { - console.log(res) courseList.value = res.body || [] + loading4.value = false + }).catch(() => { + loading4.value = false }) } onMounted(() => { @@ -377,8 +399,9 @@ backdrop-filter: blur(10rpx); z-index: 1; - &.loading-box-cont{ + &.loading-box-cont { background: #ddeafa; + &::before { content: ''; display: block; From ffe3df7a9e971484a2ec47f3fba59aaa07cbf4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 14:03:16 +0800 Subject: [PATCH 10/11] fix: bug --- .env.development.yh | 4 ++-- src/pages/sparring/detail.vue | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index 95d4857d..2b8b529b 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -2,10 +2,10 @@ 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' diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue index 1bb1291d..99726c28 100644 --- a/src/pages/sparring/detail.vue +++ b/src/pages/sparring/detail.vue @@ -18,7 +18,8 @@ 已陪练次数:{{ detailInfo.practiceTimes }} 类型:{{ detailInfo.traInterTypDesc }} - 截止时间:{{detailInfo.limitTyp === '01' ? '不限制' : detailInfo.endTm}} + 截止时间:{{detailInfo.limitTyp === '01' ? '不限制' : detailInfo.endTm}} + 通过分数:{{detailInfo.passGrade || 0}} 分 @@ -296,6 +297,9 @@ display: inline-block; width: 50%; margin-bottom: 15rpx; + &.full{ + width: 100%; + } } &-tags { From cdcdda1b089e6ff035017a0d009c55294dae6a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 14:38:49 +0800 Subject: [PATCH 11/11] fix :bug --- .env.development | 2 +- src/pages/sparring/components/talking-item.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index b8aadaaf..d49a2ba1 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' # VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' diff --git a/src/pages/sparring/components/talking-item.vue b/src/pages/sparring/components/talking-item.vue index bb5e1d5b..3a2ed46e 100644 --- a/src/pages/sparring/components/talking-item.vue +++ b/src/pages/sparring/components/talking-item.vue @@ -16,7 +16,7 @@ :isAnswering="props.isAnswering" @handleEvents="handleEvents" :activeVoiceId="activeVoiceId"> - + 回答提示