From 7f38a5d0ac7b5a9f657ed27c76109aa9ad43cbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 24 Sep 2025 09:03:47 +0800 Subject: [PATCH 1/7] fix: bug --- .env.development | 2 +- src/pages/me/index.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index 8ef84d56..8ef29d20 100644 --- a/.env.development +++ b/.env.development @@ -24,7 +24,7 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' -VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' +# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605' diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue index 9286a6b7..0c8e4fe1 100644 --- a/src/pages/me/index.vue +++ b/src/pages/me/index.vue @@ -101,7 +101,7 @@ - + { console.log('goTest'); From 49e7b064f3a5a89e684868ec8950d2a1b342e217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 24 Sep 2025 09:06:36 +0800 Subject: [PATCH 2/7] fix: bug --- src/pages/example/dialog.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/example/dialog.vue b/src/pages/example/dialog.vue index c24bc920..52823485 100644 --- a/src/pages/example/dialog.vue +++ b/src/pages/example/dialog.vue @@ -604,6 +604,7 @@ commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}) .then((_res) => { if (!!(_res.body.transContent || '').trim()) { + talkingList.value.pop(); askData.value = { reqBatch: reqBatch.value, intrctWay: '02', //01-文本;02-语音;03-图片 From 681e4b66a0617bb1148524c42d6ab0721d6ae3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 24 Sep 2025 09:16:56 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/pages/example/components/answer.vue | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 8ef29d20..e4795497 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # 'development' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = ' http://25.18.122.66:9786' #sit # VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786' diff --git a/src/pages/example/components/answer.vue b/src/pages/example/components/answer.vue index 1aa254c6..1ffaf00d 100644 --- a/src/pages/example/components/answer.vue +++ b/src/pages/example/components/answer.vue @@ -93,6 +93,21 @@ watch( immediate: true } ) +const isPlaying = ref(false) +watch( + () => props.activeVoiceId, + (val) => { + if(val === props.dataInfo.id){ + isPlaying.value = true + }else{ + isPlaying.value = false + } + }, + { + deep: true, + immediate: true + } +) const mdText = computed(() => { let _text = (props.dataInfo?.talkingText|| '').replace(/\\n/g, `\n`); return _text @@ -100,7 +115,6 @@ const mdText = computed(() => { const fileList = computed(() => props.dataInfo?.talkingFiles || []) const crsList = computed(() => props.dataInfo?.talkingCrsList || []) const activeNames = ref([1, 2]) -const isPlaying = ref(false) const talkVoiceObj = ref(null) const voiceLoading = ref(false) From 8c47c82db484bf85c87c8d4b7ea01eff1477e295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 24 Sep 2025 09:56:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dialog.js | 1 + src/pages/example/components/answer.vue | 20 +++----------------- src/pages/example/dialog.vue | 3 ++- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/api/dialog.js b/src/api/dialog.js index 846708a7..bed78f17 100644 --- a/src/api/dialog.js +++ b/src/api/dialog.js @@ -58,6 +58,7 @@ export const chatVoice = (data) => { return request({ url: '/traask/traTestchat/chatVoice', method: 'post', + timeout: 60000, data }); }; diff --git a/src/pages/example/components/answer.vue b/src/pages/example/components/answer.vue index 1ffaf00d..578c977f 100644 --- a/src/pages/example/components/answer.vue +++ b/src/pages/example/components/answer.vue @@ -11,23 +11,9 @@ - - - 引用知识库{{ fileList.length }}篇相关资料 - - - {{ index + 1 }}. {{ item.docName }} - - - 本次回答参考资料来源于网络 - - - 发现{{ crsList.length }}个关联课程 - - - {{ index + 1 }}. {{ item.crsName }} - - + 大模型请求时长:{{ dataInfo.aiAskTime }}ms + 生成语音文件时长:{{ dataInfo.transVoice }}ms + 本次回答参考资料来源于网络 diff --git a/src/pages/example/dialog.vue b/src/pages/example/dialog.vue index 52823485..6e9059b4 100644 --- a/src/pages/example/dialog.vue +++ b/src/pages/example/dialog.vue @@ -360,7 +360,8 @@ talkingFiles: [], talkingCrsList: [], talkingVoice: '', - talkingVoiceId: res.body.fileId + talkingVoiceId: res.body.fileId, + ...res.body }); }) From f21f29c44ff585c0abba1151b18fb6360df92ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 24 Sep 2025 10:14:46 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dialog.js | 2 +- src/pages/example/components/answer.vue | 13 +++++++------ src/pages/example/dialog.vue | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/api/dialog.js b/src/api/dialog.js index bed78f17..99b1584d 100644 --- a/src/api/dialog.js +++ b/src/api/dialog.js @@ -58,7 +58,7 @@ export const chatVoice = (data) => { return request({ url: '/traask/traTestchat/chatVoice', method: 'post', - timeout: 60000, + timeout: 120000, data }); }; diff --git a/src/pages/example/components/answer.vue b/src/pages/example/components/answer.vue index 578c977f..054b9b4c 100644 --- a/src/pages/example/components/answer.vue +++ b/src/pages/example/components/answer.vue @@ -73,7 +73,13 @@ watch( ) watch( () => props.isLoading, - () => {}, + (val) => { + if(!val){ + setTimeout(()=> { + playVoice() + },500) + } + }, { deep: true, immediate: true @@ -118,11 +124,6 @@ const activeNames = ref([1, 2]) talkVoiceObj.value.src = '' isPlaying.value = false }) - // itemVoice.value = unref(dataInfo).talkingVoice - // talkVoiceObj.value.src = itemVoice.value - // setTimeout(()=>{ - // setVoiceTime(0) - // },100) } const setVoiceTime = (sum) => { sum += 1 diff --git a/src/pages/example/dialog.vue b/src/pages/example/dialog.vue index 6e9059b4..aeea75c5 100644 --- a/src/pages/example/dialog.vue +++ b/src/pages/example/dialog.vue @@ -348,6 +348,7 @@ isLoading: true, id: _id + 'loading' }); + scrollToBottomNow() chatVoice({ chatVoice: data.body.intrctContent }).then(res => { @@ -363,6 +364,7 @@ talkingVoiceId: res.body.fileId, ...res.body }); + scrollToBottomNow() }) }; From 8c809434d01ffcad89296b5e038e7f14e022665d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 24 Sep 2025 10:16:13 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=9F=9F=E5=90=8D=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- .env.development_h5 | 5 ++++ .env.production | 2 +- package.json | 1 + src/api/request.js | 2 +- src/components/examination/es-analysis.vue | 27 +++++++++++----------- 6 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 .env.development_h5 diff --git a/.env.development b/.env.development index 8ef29d20..148c3d27 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # 'development' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = ' http://25.18.122.66:9786' #sit # VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786' @@ -25,6 +25,6 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' -VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605' +# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605' diff --git a/.env.development_h5 b/.env.development_h5 new file mode 100644 index 00000000..3b50f23b --- /dev/null +++ b/.env.development_h5 @@ -0,0 +1,5 @@ +# 开发环境 +ENV = 'development' +# 'development' + +VITE_APP_BASE_API_Url = '' diff --git a/.env.production b/.env.production index 6cbcc735..143ff549 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ ENV = 'production' # base api -VITE_APP_BASE_API_Url = 'http://localhost:7000' \ No newline at end of file +VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' \ No newline at end of file diff --git a/package.json b/package.json index dbc667a0..cc24343e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "build:app-plus:sit": "uni build -p app-plus --mode sit", "build:app-plus:uat": "uni build -p app-plus --mode uat", "build:app-plus:prod": "uni build -p app-plus", + "build:h5:dev": "uni build -p app-plus --mode development_h5", "build:h5": "uni build" }, "dependencies": { diff --git a/src/api/request.js b/src/api/request.js index 519dfdf0..1d2ff316 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -6,7 +6,7 @@ import common from '@/common/common.js' const ENV = import.meta.env export const get_base_url = (url = '') => { - + return '' if (ENV.MODE === 'development') { // 开发环境 // #ifdef H5 if (url) { diff --git a/src/components/examination/es-analysis.vue b/src/components/examination/es-analysis.vue index 169031ba..0e22662b 100644 --- a/src/components/examination/es-analysis.vue +++ b/src/components/examination/es-analysis.vue @@ -12,8 +12,7 @@ {{ item.gradeDimens }}: {{ item.anlyGrade }} - 关键词:{{ passKeyword }} - + @@ -50,20 +49,20 @@ if (!props.value.relKeyword) return []; return props.value.relKeyword.split(/[,、]/).map((key) => key.trim()); }); + + const highlightedText = computed(() => { + // 如果没有关键词,直接返回原文本 + if (!keywords.value.length) return '你的答案:' + props.answerText; + // 构建正则表达式,匹配所有关键词(不区分大小写) + // 对关键词进行转义,避免特殊字符影响正则 + const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); - // const highlightedText = computed(() => { - // // 如果没有关键词,直接返回原文本 - // if (!keywords.value.length) return '你的答案:' + props.answerText; - // // 构建正则表达式,匹配所有关键词(不区分大小写) - // // 对关键词进行转义,避免特殊字符影响正则 - // const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); + // 创建正则表达式,g表示全局匹配,i表示不区分大小写 + const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi'); - // // 创建正则表达式,g表示全局匹配,i表示不区分大小写 - // const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi'); - - // // 替换匹配到的关键词,用span包裹并添加高亮样式 - // return '你的答案:' + props.answerText.replace(regex, (match) => `${match}`); - // }); + // 替换匹配到的关键词,用span包裹并添加高亮样式 + return '你的答案:' + props.answerText.replace(regex, (match) => `${match}`); + }); const dimension_all_score = computed(() => { return ( evalSettingVos.value From c2cca24ea0c7232a578f4f4db49776fa77b24235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 24 Sep 2025 10:21:18 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index dc47c470..1df64dec 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,16 +2,16 @@ "name" : "tra-app", "appid" : "__UNI__EDE0E52", "description" : "", - "versionName" : "0.0.1", - "versionCode" : 1, + "versionName" : "0.0.2", + "versionCode" : 2, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { "usingComponents" : true, "nvueStyleCompiler" : "uni-app", "compilerVersion" : 3, - "renderer": "auto", - "orientation": ["portrait-primary"], + "renderer" : "auto", + "orientation" : [ "portrait-primary" ], "splashscreen" : { "alwaysShowBeforeRender" : true, "waiting" : false,