From 46cc3a311f924cf5ac954c7cdb304f4d09d8f905 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Tue, 20 Aug 2024 11:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/ExaminerLogin.ets | 8 +++++++- entry/src/main/ets/pages/UserInfo.ets | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/entry/src/main/ets/pages/ExaminerLogin.ets b/entry/src/main/ets/pages/ExaminerLogin.ets index 03d9ac09..41f4f67d 100644 --- a/entry/src/main/ets/pages/ExaminerLogin.ets +++ b/entry/src/main/ets/pages/ExaminerLogin.ets @@ -14,6 +14,7 @@ export default struct Index { @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 currentInputIndex: number = 0 + @State limit: boolean = false @State @Watch('outClick') outFlag: boolean = false; private vocObj = null; private title = '' @@ -79,7 +80,9 @@ export default struct Index { }); return } - + if(this.limit){ + return + } const param = { carId: globalThis.carInfo.carId, examinationRoomId: globalThis.carInfo.examinationRoomId, @@ -88,10 +91,13 @@ export default struct Index { } this.type='2' this.errorDialog.open() + this.limit=true console.log('carInfo', JSON.stringify(globalThis.carInfo)) examinerLoginService(param).then(res => { console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res)) this.errorDialog.close() + + this.limit=false if(res?.examinerLoginRsp?.head?.resultCode=='1'){ // this.type='1' // this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage) diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 2f288112..8f2933c9 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -462,13 +462,13 @@ struct UserInfo { await upDateTableByArray('USER', []) this.type='2' this.errorDialog.open() + this.updateTimeLimit = true const param = `${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}${globalThis.carInfo.carId}${globalThis.carInfo.examinationRoomId}${globalThis.username}` getExaminationStudentInfo(param).then(async (res) => { this.errorDialog.close() setTimeout(() => { - this.updateTimeLimit = true - }, 30000) - this.updateTimeLimit = false + this.updateTimeLimit = false + }, 3000) if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') { return } @@ -517,6 +517,7 @@ struct UserInfo { } }) }).catch((error) => { + this.updateTimeLimit = false console.log('error12error' + error) }) }