Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
@@ -45,7 +45,7 @@ const typeConfig = {
|
||||
},
|
||||
'06': {
|
||||
name: 'AI问答次数徽章',
|
||||
paramsKey: '',
|
||||
paramsKey: 'taskId',
|
||||
rule: ''
|
||||
},
|
||||
'07': {
|
||||
@@ -84,7 +84,7 @@ export default function usePointsAndBadge() {
|
||||
|
||||
// 适配参数键(crsId/papersId/无参数)
|
||||
if (config?.paramsKey) {
|
||||
if (!params) {
|
||||
if (!params && type !== '06') {
|
||||
console.warn(`类型${type}(${config.name})需传入${config.paramsKey}参数`);
|
||||
complete(false, '缺少必要参数');
|
||||
return;
|
||||
@@ -105,7 +105,23 @@ export default function usePointsAndBadge() {
|
||||
}
|
||||
console.log('调用积分接口', res);
|
||||
console.log('pointsRefpointsRef', pointsRef.value);
|
||||
|
||||
// 06AI问答 不弹出积分窗口
|
||||
if(type=== '06'){
|
||||
if (badgesList.length > 0) {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
badgeRef.value.open(pointsList, badgesList, () => {
|
||||
badgeRef.value.close()
|
||||
complete(true, '', res);
|
||||
});
|
||||
}, pop_up_time);
|
||||
});
|
||||
}else{
|
||||
complete(true, '', res);
|
||||
}
|
||||
return
|
||||
}
|
||||
// 弹出积分窗口
|
||||
pointsRef.value.open(res.body.points, res.body.pointsBadges, (status, pointsList, badgesList) => {
|
||||
pointsRef.value.close()
|
||||
if (badgesList.length > 0) {
|
||||
|
||||
@@ -105,6 +105,7 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
const initVoice = () => {
|
||||
talkVoiceObj.value = uni.createInnerAudioContext()
|
||||
talkVoiceObj.value.onPause(()=>{
|
||||
talkVoiceObj.value.volume = 1
|
||||
})
|
||||
talkVoiceObj.value.onPlay(()=>{
|
||||
if(isTesting.value){
|
||||
@@ -115,6 +116,7 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
talkVoiceObj.value.onEnded(()=>{
|
||||
emit('changePlay', '')
|
||||
talkVoiceObj.value.src = ''
|
||||
talkVoiceObj.value.volume = 1
|
||||
})
|
||||
talkVoiceObj.value.onError(()=>{
|
||||
talkVoiceObj.value.src = ''
|
||||
@@ -122,6 +124,7 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
itemVoice.value = unref(dataInfo).talkingVoice
|
||||
talkVoiceObj.value.src = itemVoice.value
|
||||
isTesting.value = true
|
||||
talkVoiceObj.value.volume = 0
|
||||
talkVoiceObj.value.play()
|
||||
talkVoiceObj.value.pause()
|
||||
setTimeout(()=>{
|
||||
|
||||
@@ -418,6 +418,7 @@
|
||||
}).then(res=>{
|
||||
watchFlag.value = 1;
|
||||
socketStore?.closeSocket();
|
||||
changePlayItemId('')
|
||||
pointAndBadgesRun(talkingType.value === '01'? '07': '08', null, ()=>{
|
||||
common.navigateTo('/pages/sparring/result?traId=' + traId.value + '&execId=' + execId.value + '&type=' + talkingType.value + '&isPreview=' + (isPreview.value ?'1':''))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user