合并冲突
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -31,20 +31,20 @@
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
课程学习次数
|
||||
完成课程数
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.crsStdyCnt }}</text>
|
||||
<text class="analytics-item-value-v">{{statisticsObj.completeCrsCnt }}</text>
|
||||
<text class="analytics-item-value-unit">次</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
课程练习时长
|
||||
课程完成率
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.crsExrTmLen }}</text>
|
||||
<text class="analytics-item-value-unit">h</text>
|
||||
<text class="analytics-item-value-v">{{statisticsObj.crsCompleteRate }}</text>
|
||||
<text class="analytics-item-value-unit">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
@@ -67,13 +67,22 @@
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
考试合格率
|
||||
考试及格率
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.passExamRate }}</text>
|
||||
<text class="analytics-item-value-unit">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
问答次数
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.askCnt }}</text>
|
||||
<text class="analytics-item-value-unit">次</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
陪练次数
|
||||
@@ -85,22 +94,13 @@
|
||||
</view>
|
||||
<view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
课程学习次数
|
||||
陪练通过率
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.askCnt }}</text>
|
||||
<text class="analytics-item-value-unit">次</text>
|
||||
<text class="analytics-item-value-v">{{statisticsObj.partnerRate }}</text>
|
||||
<text class="analytics-item-value-unit">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="analytics-item">
|
||||
<view class="analytics-item-title">
|
||||
软件用时
|
||||
</view>
|
||||
<view class="analytics-item-value">
|
||||
<text class="analytics-item-value-v">{{statisticsObj.crsStdyCnt }}</text>
|
||||
<text class="analytics-item-value-unit">h</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="evaluation-box dens" v-if="loading">
|
||||
@@ -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([])
|
||||
|
||||
@@ -737,6 +737,7 @@
|
||||
commond: 'ASK',
|
||||
body: askData.value
|
||||
});
|
||||
setHeight({height: 0})
|
||||
};
|
||||
const startRecordCallback = () => {
|
||||
// 开始录音回调
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
</view>
|
||||
<view class="right-time">{{voiceTime}}</view>
|
||||
<view class="talking-cont">
|
||||
<text :class="['talking-text translate-text loading']" v-show="!translateLoading" v-html="showContent">
|
||||
</text>
|
||||
<rich-text :class="['talking-text translate-text loading']" v-show="!translateLoading" :nodes="`<span>${showContent}</span>`">
|
||||
</rich-text>
|
||||
<view class="talking-text translate-text" v-if="translateLoading">
|
||||
<CommonLoading color="#f60"/>
|
||||
</view>
|
||||
|
||||
@@ -242,12 +242,11 @@
|
||||
const setTextColor = (str) => {
|
||||
let _str = str
|
||||
positiveList.value.forEach(t => {
|
||||
_str = _str.split(t).join(`<text style="color: #15b859;text-decoration:underline;">${t}</text>`)
|
||||
_str = _str.split(t).join(`<span style="color: #15b859;text-decoration:underline;">${t}</span>`)
|
||||
})
|
||||
negativeList.value.forEach(t => {
|
||||
_str = _str.split(t).join(`<text style="color: #d70c18;text-decoration:underline;">${t}</text>`)
|
||||
_str = _str.split(t).join(`<span style="color: #d70c18;text-decoration:underline;">${t}</span>`)
|
||||
})
|
||||
console.log(_str)
|
||||
return _str
|
||||
}
|
||||
const isPreview = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user