feat:1. 靠边停车项目进行中不能退出 2.344参数修改

This commit is contained in:
Surenjun 2025-07-29 15:07:29 +08:00
parent 94b3b2e96a
commit d2e795c82f

View File

@ -920,6 +920,25 @@ struct Index {
.backgroundImage($rawfile('judge/anniu_nor.png'), ImageRepeat.NoRepeat)
.backgroundImageSize({ width: '100%', height: '100%' })
.onClick(() => {
//靠边停车进行中&且其它项目都已经完成 不能结束
if(!this.singlePlay && this.projectsObj['40600']?.type == '2' && this.isRequiredProjectsEnd){
Prompt.showToast({
message: '靠边停车项目进行中,不允许手动退出!',
duration: 4000
});
return
}
//考试未结束且有扣分,不允许退出
if (!this.singlePlay && this.judgeConfigObj['344'] == 1 && this.kfArr.length > 0&& !this.isAllProjectsEnd ) {
Prompt.showToast({
message: '考试未结束且有扣分,不允许手动退出!',
duration: 4000
});
return
}
// this.vocObj.playAudio({
// type: 1,
// name: 'button_media.wav'
@ -1029,13 +1048,7 @@ struct Index {
router.back()
return
}
if (this.judgeConfigObj['344'] == 1) {
Prompt.showToast({
message: '考试未结束,不允许手动退出!',
duration: 4000
});
return
}
this.endPopupVisible = false;
this.loadingPopupVisible = true
clearInterval(this.timer);
@ -1427,7 +1440,7 @@ struct Index {
// 必考项目除靠边停车是否全部完成
@State isRequiredProjectsEnd: boolean = false;
// 考试项目是否全部完成
// @State isAllProjectsEnd: boolean = false;
@State isAllProjectsEnd: boolean = false;
@State lane: LANE = { road: '', num: 0, count: 0 }
@State roadData: Object = {};
//定位差分状态时候正常