This commit is contained in:
lvyuankang 2024-08-20 11:26:12 +08:00
parent 6d86dad782
commit 46cc3a311f
2 changed files with 11 additions and 4 deletions

View File

@ -14,6 +14,7 @@ export default struct Index {
@State inputTextArr: string[] = ['', '']; @State inputTextArr: string[] = ['', ''];
@State imgArr1: Resource[] = [$r('app.media.1_nor'), $r('app.media.2_nor'), $r('app.media.3_nor'), $r('app.media.4_nor'), $r('app.media.5_nor'), $r('app.media.6_nor'), $r('app.media.7_nor'), $r('app.media.8_nor'), $r('app.media.9_nor'), $r('app.media.0_nor'), $r('app.media.x_nor'), $r('app.media.clear_nor'), $r('app.media.delete_nor'), $r('app.media.confirm_nor')] @State imgArr1: Resource[] = [$r('app.media.1_nor'), $r('app.media.2_nor'), $r('app.media.3_nor'), $r('app.media.4_nor'), $r('app.media.5_nor'), $r('app.media.6_nor'), $r('app.media.7_nor'), $r('app.media.8_nor'), $r('app.media.9_nor'), $r('app.media.0_nor'), $r('app.media.x_nor'), $r('app.media.clear_nor'), $r('app.media.delete_nor'), $r('app.media.confirm_nor')]
@State currentInputIndex: number = 0 @State currentInputIndex: number = 0
@State limit: boolean = false
@State @Watch('outClick') outFlag: boolean = false; @State @Watch('outClick') outFlag: boolean = false;
private vocObj = null; private vocObj = null;
private title = '' private title = ''
@ -79,7 +80,9 @@ export default struct Index {
}); });
return return
} }
if(this.limit){
return
}
const param = { const param = {
carId: globalThis.carInfo.carId, carId: globalThis.carInfo.carId,
examinationRoomId: globalThis.carInfo.examinationRoomId, examinationRoomId: globalThis.carInfo.examinationRoomId,
@ -88,10 +91,13 @@ export default struct Index {
} }
this.type='2' this.type='2'
this.errorDialog.open() this.errorDialog.open()
this.limit=true
console.log('carInfo', JSON.stringify(globalThis.carInfo)) console.log('carInfo', JSON.stringify(globalThis.carInfo))
examinerLoginService(param).then(res => { examinerLoginService(param).then(res => {
console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res)) console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
this.errorDialog.close() this.errorDialog.close()
this.limit=false
if(res?.examinerLoginRsp?.head?.resultCode=='1'){ if(res?.examinerLoginRsp?.head?.resultCode=='1'){
// this.type='1' // this.type='1'
// this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage) // this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage)

View File

@ -462,13 +462,13 @@ struct UserInfo {
await upDateTableByArray('USER', []) await upDateTableByArray('USER', [])
this.type='2' this.type='2'
this.errorDialog.open() this.errorDialog.open()
this.updateTimeLimit = true
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>` const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
getExaminationStudentInfo(param).then(async (res) => { getExaminationStudentInfo(param).then(async (res) => {
this.errorDialog.close() this.errorDialog.close()
setTimeout(() => { setTimeout(() => {
this.updateTimeLimit = true this.updateTimeLimit = false
}, 30000) }, 3000)
this.updateTimeLimit = false
if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') { if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') {
return return
} }
@ -517,6 +517,7 @@ struct UserInfo {
} }
}) })
}).catch((error) => { }).catch((error) => {
this.updateTimeLimit = false
console.log('error12error' + error) console.log('error12error' + error)
}) })
} }