diff --git a/.env.development b/.env.development
index 1f920724..fa6a7917 100644
--- a/.env.development
+++ b/.env.development
@@ -5,13 +5,17 @@ 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'
+
+
# 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..ff0a76ed 100644
--- a/.env.development.yh
+++ b/.env.development.yh
@@ -7,5 +7,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_TRAAPP = 'http://25.64.32.154:9601'
+# 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
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);
}
});
diff --git a/src/pages/analytics/study.vue b/src/pages/analytics/study.vue
index 8097a27f..4ff330f4 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 }}
+ %
-
@@ -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([])
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 = () => {
// 开始录音回调
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)