fix: bug
This commit is contained in:
@@ -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