From c127012dd4df20beab5fb120a757ec77ec1eba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 16:58:35 +0800 Subject: [PATCH 1/6] fix: bug --- .env.development | 4 ++-- .env.development.yh | 4 ++-- src/pages/sparring/components/question-preview.vue | 4 ++-- src/pages/sparring/result.vue | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.env.development b/.env.development index cdb41669..f7b3eed0 100644 --- a/.env.development +++ b/.env.development @@ -5,13 +5,13 @@ 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:7002' # VITE_APP_BASE_API_Url = 'http://192.168.247.200' # VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = 'http://192.168.108.129' # dev -VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' +# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # sit 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/pages/sparring/components/question-preview.vue b/src/pages/sparring/components/question-preview.vue index 241b2364..37163a26 100644 --- a/src/pages/sparring/components/question-preview.vue +++ b/src/pages/sparring/components/question-preview.vue @@ -5,8 +5,8 @@ {{voiceTime}} - - + + diff --git a/src/pages/sparring/result.vue b/src/pages/sparring/result.vue index caae7a50..cb216f3f 100644 --- a/src/pages/sparring/result.vue +++ b/src/pages/sparring/result.vue @@ -242,12 +242,11 @@ const setTextColor = (str) => { let _str = str positiveList.value.forEach(t => { - _str = _str.split(t).join(`${t}`) + _str = _str.split(t).join(`${t}`) }) negativeList.value.forEach(t => { - _str = _str.split(t).join(`${t}`) + _str = _str.split(t).join(`${t}`) }) - console.log(_str) return _str } const isPreview = ref(false) From 1ad3ae0c388f2015d3a73211f69ac5fa9d732b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 17:06:37 +0800 Subject: [PATCH 2/6] fix: bug --- src/pages/analytics/study.vue | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/pages/analytics/study.vue b/src/pages/analytics/study.vue index 8097a27f..31d4b685 100644 --- a/src/pages/analytics/study.vue +++ b/src/pages/analytics/study.vue @@ -31,20 +31,20 @@ - 课程学习次数 + 完成课程数 - {{statisticsObj.crsStdyCnt }} + {{statisticsObj.completeCrsCnt }} - 课程练习时长 + 课程完成率 - {{statisticsObj.crsExrTmLen }} - h + {{statisticsObj.crsCompleteRate }} + % @@ -67,13 +67,22 @@ - 考试合格率 + 考试及格率 {{statisticsObj.passExamRate }} % + + + 问答次数 + + + {{statisticsObj.askCnt }} + + + 陪练次数 @@ -85,22 +94,13 @@ - 课程学习次数 + 陪练通过率 - {{statisticsObj.askCnt }} - + {{statisticsObj.partnerRate }} + % - From 2685c202029ec9a16f0481eb5c3ea2d456f3ed13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 17:08:54 +0800 Subject: [PATCH 3/6] fix: bug --- src/pages/analytics/study.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/analytics/study.vue b/src/pages/analytics/study.vue index 31d4b685..4ff330f4 100644 --- a/src/pages/analytics/study.vue +++ b/src/pages/analytics/study.vue @@ -186,14 +186,15 @@ }) const calendarRef = ref() const statisticsObj = ref({ - "crsStdyTmLen": 0, - "crsStdyCnt": 0, - "crsExrTmLen": 0, - "completeTaskCnt": 0, - "completedExamCnt": 0, - "passExamRate": 0, - "partnerCnt": 9, - "askCnt": 0 + crsStdyTmLen: 0, + completeTaskCnt: 0, + completedExamCnt: 0, + passExamRate: 0, + partnerCnt: 0, + askCnt: 0, + completeCrsCnt: 0, + crsCompleteRate: 0, + partnerRate: 0 }) const dimesionList = ref([]) const studyList = ref([]) From 40aab177d7feaf135d2e60cfc25862cbb251cce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 19:51:13 +0800 Subject: [PATCH 4/6] =?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.yh | 2 +- src/pages/index/dialog.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.development.yh b/.env.development.yh index 3934d26d..69c6c09e 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -6,6 +6,6 @@ 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_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' diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index 0c17dee5..a1835f26 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -737,6 +737,7 @@ commond: 'ASK', body: askData.value }); + setHeight({height: 0}) }; const startRecordCallback = () => { // 开始录音回调 From 64de2d1d7cd927d38fafdbea9daad7b12fb1e7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 20:28:07 +0800 Subject: [PATCH 5/6] fix: bug --- .env.development.yh | 4 +- .../points-and-badge/usePointsAndBadge.js | 83 +++---------------- 2 files changed, 13 insertions(+), 74 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index 69c6c09e..37f4a114 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_TRAPRACTICE = 'http://25.64.32.156:9603' # 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 63cd6caa..194ff8d1 100644 --- a/src/components/points-and-badge/usePointsAndBadge.js +++ b/src/components/points-and-badge/usePointsAndBadge.js @@ -16,87 +16,26 @@ import { addPointsByTask } from '@/api/pointsAndRank.js' import { - ref, nextTick + ref, + nextTick } from 'vue' import { pop_up_time } from '@/enum'; -// 徽章类型配置:映射类型编码、参数键、规则描述 -const typeConfig = { - '02': { - name: '完成课程学习', - paramsKey: 'crsId', - rule: '首次完成1分,每天最多5分' - }, - '03': { - name: '通过课程考试', - paramsKey: 'crsId', - rule: '首次完成1分,每天最多5分' - }, - '04': { - name: '完成课程练习', - paramsKey: 'crsId', - rule: '首次完成1分,每天最多5分' - }, - '05': { - name: '完成考试中心考试', - paramsKey: 'papersId', - rule: '首次完成1分,每天最多5分' - }, - '06': { - name: 'AI问答次数徽章', - paramsKey: 'taskId', - rule: '' - }, - '07': { - name: '通过AI陪练练习', - paramsKey: '', - rule: '每次1分,每天最多5分' - }, - '08': { - name: '通过AI陪练考试', - paramsKey: '', - rule: '每次1分,每天最多5分' - }, - '11': { - name: '完成竞赛PK', - paramsKey: '', - rule: '每次1分,每天最多5分' - } -} export default function usePointsAndBadge() { const badgeRef = ref(null); const pointsRef = ref(null); - const pointAndBadgesRun = async (type, params = null, complete = () => {}) => { - // 校验类型合法性 - if (!typeConfig[type] && type !== 'sign') { - console.warn(`不支持的徽章类型:${type}`); - complete(false, '类型不合法'); - return; - } - - let requestParams = { - type - }; - const config = typeConfig[type]; - - // 适配参数键(crsId/papersId/无参数) - if (config?.paramsKey) { - if (!params && type !== '06') { - console.warn(`类型${type}(${config.name})需传入${config.paramsKey}参数`); - complete(false, '缺少必要参数'); - return; - } - requestParams[config.paramsKey] = params; - } - + const pointAndBadgesRun = async (type, taskId = null, complete = () => {}) => { try { // 调用积分接口 console.log('调用积分接口'); - const res = await addPointsByTask(requestParams); - if(type=== '04') { // 完成课程练习,自己处理逻辑 + const res = await addPointsByTask({ + type, + taskId + }); + if (type === '04') { // 完成课程练习,自己处理逻辑 return { points: res.body.points, message: res.body.message, @@ -106,7 +45,7 @@ export default function usePointsAndBadge() { console.log('调用积分接口', res); console.log('pointsRefpointsRef', pointsRef.value); // 06AI问答 不弹出积分窗口 - if(type=== '06'){ + if (type === '06') { if (badgesList.length > 0) { nextTick(() => { setTimeout(() => { @@ -116,7 +55,7 @@ export default function usePointsAndBadge() { }); }, pop_up_time); }); - }else{ + } else { complete(true, '', res); } return @@ -133,7 +72,7 @@ export default function usePointsAndBadge() { }); }, pop_up_time); }); - }else{ + } else { complete(true, '积分获取成功', res); } }); From 20f49a172aae253e963cf14201901065a4a1c2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 20 Nov 2025 20:36:06 +0800 Subject: [PATCH 6/6] fix :bug --- .env.development.yh | 1 + src/components/points-and-badge/points.vue | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index 37f4a114..ff0a76ed 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -8,4 +8,5 @@ VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # 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.158:9601' diff --git a/src/components/points-and-badge/points.vue b/src/components/points-and-badge/points.vue index b3ad9ec2..235d0c0c 100644 --- a/src/components/points-and-badge/points.vue +++ b/src/components/points-and-badge/points.vue @@ -56,10 +56,9 @@ }; const emits = defineEmits(['confirm']); - const open = (points, badges=[], complete = () => {}) => { - console.log('开启积分弹窗'); + const open = (points=[], badges=[], complete = () => {}) => { if (!Array.isArray(points) || points.length === 0) { - console.error('points 不是有效的数组或为空'); + // console.error('points 不是有效的数组或为空'); // 积分为空直接调用完成 emits( 'confirm', @@ -67,6 +66,7 @@ points, badges ); + complete(false, points, badges) return; } CloseComplete = complete