逻辑优化
This commit is contained in:
parent
b446c9442a
commit
7645ab8c14
@ -134,10 +134,13 @@ struct Index {
|
|||||||
}, router.RouterMode.Single)
|
}, router.RouterMode.Single)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async heartMsg() {
|
async heartMsg() {
|
||||||
|
|||||||
@ -884,6 +884,8 @@ struct UserInfo {
|
|||||||
const {carId,examinationRoomId} = carInfo;
|
const {carId,examinationRoomId} = carInfo;
|
||||||
let examItems = { getExaminationItemRsp: { body: { ykxx: '', jdxx: '' } } };
|
let examItems = { getExaminationItemRsp: { body: { ykxx: '', jdxx: '' } } };
|
||||||
if (!globalThis.singlePlay) {
|
if (!globalThis.singlePlay) {
|
||||||
|
try {
|
||||||
|
|
||||||
//获取已考项目
|
//获取已考项目
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
examItems = await getExaminationItem({
|
examItems = await getExaminationItem({
|
||||||
@ -892,6 +894,15 @@ struct UserInfo {
|
|||||||
lsh: this.currentUser.lsh || '',
|
lsh: this.currentUser.lsh || '',
|
||||||
examinationRoomId
|
examinationRoomId
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
promptAction.showToast({
|
||||||
|
message: "获取考试信息失败,请重试",
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
this.isLoadingPopupVisible = false
|
||||||
|
this.isExamStart = false
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.currentUser.id = '1'
|
this.currentUser.id = '1'
|
||||||
const avPlayer = this.avPlayer;
|
const avPlayer = this.avPlayer;
|
||||||
@ -899,10 +910,9 @@ struct UserInfo {
|
|||||||
|
|
||||||
avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => {
|
avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => {
|
||||||
console.info('surenjun', '播放结束开始考试接口调用')
|
console.info('surenjun', '播放结束开始考试接口调用')
|
||||||
|
try {
|
||||||
const {code,keystr,message} = await this.beginExam() || {};
|
const {code,keystr,message} = await this.beginExam() || {};
|
||||||
console.info('surenjun', '开始考试接口调用结束')
|
console.info('surenjun', '开始考试接口调用结束')
|
||||||
// console.info('surenjun',code +'')
|
|
||||||
//@ts-ignore TODO code转换
|
|
||||||
|
|
||||||
if (code != 1) {
|
if (code != 1) {
|
||||||
avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']);
|
avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']);
|
||||||
@ -959,6 +969,15 @@ struct UserInfo {
|
|||||||
this.updateTimeLimit = false
|
this.updateTimeLimit = false
|
||||||
this.stopDeviceById()
|
this.stopDeviceById()
|
||||||
this.stepFlag = false
|
this.stepFlag = false
|
||||||
|
} catch (e) {
|
||||||
|
promptAction.showToast({
|
||||||
|
message: "监管审核失败,请重试",
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
this.isLoadingPopupVisible = false
|
||||||
|
this.isExamStart = false
|
||||||
|
return
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1320,6 +1320,7 @@ export default class Judge {
|
|||||||
const {lsh,idCard,serialNumber,kssycs,totalScore,judgeConfigObj,isAllProjectsEnd,passingScore} = judgeUI
|
const {lsh,idCard,serialNumber,kssycs,totalScore,judgeConfigObj,isAllProjectsEnd,passingScore} = judgeUI
|
||||||
//TODO 断网考试结束补传
|
//TODO 断网考试结束补传
|
||||||
// await uploadDisConnectData();
|
// await uploadDisConnectData();
|
||||||
|
try {
|
||||||
const time = await getCurrentTime();
|
const time = await getCurrentTime();
|
||||||
const photoBase64 = await getPhoto();
|
const photoBase64 = await getPhoto();
|
||||||
const {d1,d2,d3,d4,d5} = ksjs
|
const {d1,d2,d3,d4,d5} = ksjs
|
||||||
@ -1466,7 +1467,13 @@ export default class Judge {
|
|||||||
}, param302 == 8 ? 3000 : 0)
|
}, param302 == 8 ? 3000 : 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
promptAction.showToast({
|
||||||
|
message: "考试结束异常,请尝试重新结束",
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
judgeUI.loadingPopupVisible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 当前项目转换
|
// 当前项目转换
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user