From 38a3436b2cc711e91b9b1f15f692557b15926135 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Thu, 1 Aug 2024 17:04:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=AD=A6=E5=91=98?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/UserInfo.ets | 169 ++++++++++++++------------ 1 file changed, 94 insertions(+), 75 deletions(-) diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 5e5d5346..3b988465 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -17,17 +17,13 @@ import promptAction from '@ohos.promptAction'; import FilePhoto from './judgeSDK/utils/filePhoto'; import { getSyncData, upDateTableByArray } from '../common/service/initable'; import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; -import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup' -import LoadingPopup from './compontents/judge/LoadingPopup'; +import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'; import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; -import { JudgeConfig } from '../config/judge'; import { judgeConfig } from './judgeSDK/utils/judgeConfig'; @Entry @Component struct UserInfo { - private filePhoto: FilePhoto - private avPlayer @State pageIndex: number = 0 @State ratio: number = 1700 / 960 @State index: number = 0 @@ -46,9 +42,12 @@ struct UserInfo { @State isBoardPrePareSetPopupOpen: boolean = false @State isFirstBoardPrePareSetPopupBtnShow: boolean = false @State isBoardPrePareSetPopupShow: boolean = false - @State isLoadingPopupVisible:boolean = false; - @State loadingText:string = '正在生成考试记录,请稍后...' - @State sczbkf:{xmdm:number,kfdm:string}[] = [] + @State isLoadingPopupVisible: boolean = false; + @State loadingText: string = '正在生成考试记录,请稍后...' + @State sczbkf: { + xmdm: number, + kfdm: string + }[] = [] @State currentUser: User = EmptyCandidateObject @State dataList: Array = [] @State list: Array = [] @@ -61,7 +60,7 @@ struct UserInfo { @State idCard: string = ''; @State grantDept: string = ''; //是否已经开始考试 - @State isExamStart:boolean = false; + @State isExamStart: boolean = false; @State effectDate: string = ''; @State interval: any = null; @State studentRefreshStatue: string = '0'; @@ -73,6 +72,20 @@ struct UserInfo { @State FaceOpenStatue: string = '0'; //是否开启人脸识别 subscriber; @State faceCatchImg: string = '' + // 过程照片拍照 + getPhoto = async (empty?: boolean) => { + const singlePlay = globalThis.singlePlay + //单机模式返回空照片 + if (singlePlay) { + return '' + } else { + const {filePhoto} = this; + const photoBase64 = await filePhoto.getPhoto(); + return photoBase64 + } + } + private filePhoto: FilePhoto + private avPlayer private AccountTable = new AccountTable(() => { }, USER); private context = getContext(this) as common.UIAbilityContext; @@ -87,7 +100,7 @@ struct UserInfo { async onPageShow() { const mediaTest = new FilePhoto(this.context); - this.filePhoto = new FilePhoto(this.context); + this.filePhoto = new FilePhoto(this.context); //语音功能 new WebRTCVoice(this.context); //初始化数据 @@ -140,10 +153,10 @@ struct UserInfo { this.stopDeviceById() // globalThis.statue=4 router.pushUrl({ - url: examSubject == 3 ? 'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', + params: { + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); return @@ -246,9 +259,9 @@ struct UserInfo { //@ts-ignore syssetParams.forEach(sys => { //364 绕车一周评判时机(1-开始考试后判 2-开始考试前判) - if(sys.v_no === '364'){ - this.isBoardPrePareSetPopupOpen = true; - } + if (sys.v_no === '364') { + this.isBoardPrePareSetPopupOpen = true; + } }) } @@ -345,6 +358,13 @@ struct UserInfo { } this.pageIndex++; this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) + this.dataList.forEach(listData => { + for (let i in listData) { + listData[i] = decodeURI(listData[i]) + } + listData.kszp = this.photo + listData.kszp + listData.ksmjzp = this.photo + listData.ksmjzp + }) } prevClick() { @@ -353,6 +373,13 @@ struct UserInfo { } this.pageIndex--; this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) + this.dataList.forEach(listData => { + for (let i in listData) { + listData[i] = decodeURI(listData[i]) + } + listData.kszp = this.photo + listData.kszp + listData.ksmjzp = this.photo + listData.ksmjzp + }) } //获取下载考生 @@ -474,8 +501,8 @@ struct UserInfo { const carInfo = globalThis.carInfo; const {carId,examinationRoomId} = carInfo; this.showFaceCompare = false - let examItems = {getExaminationItemRsp:{body:{ykxx:''}}}; - if(!globalThis.singlePlay){ + let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; + if (!globalThis.singlePlay) { //获取已考项目 examItems = await getExaminationItem({ time: getCurrentTime(), @@ -487,10 +514,10 @@ struct UserInfo { this.currentUser.id = '1' //是否已经开始考试 // if(!this.isExamStart){ - const code = await this.beginExam(); - if (code != 1) { - return - } + const code = await this.beginExam(); + if (code != 1) { + return + } // } this.AccountTable.query('0', (result) => { if (result.length == 0) { @@ -502,9 +529,9 @@ struct UserInfo { router.pushUrl({ url: 'pages/Judge', params: { - examItems: examItems?.getExaminationItemRsp?.body?.ykxx , - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + examItems: examItems?.getExaminationItemRsp?.body?.ykxx, + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); this.stopDeviceById() @@ -515,11 +542,11 @@ struct UserInfo { this.AccountTable.query('0', (result) => { this.stepFlag = false router.pushUrl({ - url:'pages/Judge', + url: 'pages/Judge', params: { - examItems: examItems?.getExaminationItemRsp?.body?.ykxx , - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + examItems: examItems?.getExaminationItemRsp?.body?.ykxx, + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); globalThis.statue = 4 @@ -530,47 +557,36 @@ struct UserInfo { }) this.stepFlag = false } - // 过程照片拍照 - getPhoto = async (empty?: boolean) => { - const singlePlay = globalThis.singlePlay - //单机模式返回空照片 - if (singlePlay) { - return '' - } else { - const {filePhoto} = this; - const photoBase64 = await filePhoto.getPhoto(); - return photoBase64 - } - } // 检测车门、熄火信号 - async checkSignal():Promise{ + async checkSignal(): Promise { const {isCheckFireOpen} = judgeConfig - return new Promise((resolve,reject)=>{ - if(isCheckFireOpen){ + return new Promise((resolve, reject) => { + if (isCheckFireOpen) { resolve(true) } globalThis.udpClient.onMessage_1(async (msg) => { const msgArr = msg.split(',') const mkg = msgArr[14]; const fdjzs = msgArr[25]; - globalThis.udpClient.onMessage_1(()=>{}); + globalThis.udpClient.onMessage_1(() => { + }); //TODO console.info('surenjun mkg=>', mkg) console.info('surenjun fdjzs=>', fdjzs) - if(mkg == 1){ + if (mkg == 1) { this.avPlayer.playAudio(['voice/关门.mp3']) promptAction.showToast({ - message:'请关闭车门', - duration:4000 + message: '请关闭车门', + duration: 4000 }) reject(false) } - if(fdjzs*1 > 0){ + if (fdjzs * 1 > 0) { this.avPlayer.playAudio(['voice/熄火.mp3']) promptAction.showToast({ - message:'请熄火', - duration:4000 + message: '请熄火', + duration: 4000 }) reject(false) } @@ -578,22 +594,23 @@ struct UserInfo { }) }) } + // 开始考试 - async beginExam(){ + async beginExam() { const carInfo = globalThis.carInfo; const {carId,examinationRoomId} = carInfo; const { examSubject,plateNo } = carInfo; const date = new Date() - console.info('surenjun','photoBase64') + console.info('surenjun', 'photoBase64') const photoBase64 = await this.getPhoto(); - console.info('surenjun','photoBase64End') + console.info('surenjun', 'photoBase64End') const drvexam = { lsh: this.currentUser.lsh || '', kskm: examSubject, ksxtbh: this.ksxtbh || '222', sfzmhm: this.currentUser.sfzmhm || '', ksysfzmhm: this.currentUser.ksy1sfzmhm || '', - ksxl:this.currentUser.ksxl, + ksxl: this.currentUser.ksxl, zp: photoBase64, kssj: dateFormat(date) || '', kchp: decodeURI(plateNo), @@ -661,6 +678,8 @@ struct UserInfo { .backgroundImageSize({ width: '100%', height: '100%' }) .onClick(() => { this.currentUser = item + + }) }) }.width(640 * this.ratio).margin({ left: 30 * this.ratio }) @@ -734,23 +753,23 @@ struct UserInfo { this.qkFlag = true }) - if( this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow){ + if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) { //上车准备 - Image($r('app.media.sczb_btn')).commStyle().onClick(async ()=>{ + Image($r('app.media.sczb_btn')).commStyle().onClick(async () => { try { await this.checkSignal() this.isExamStart = true - await upDateTableByArray('USER',[this.currentUser]) + await upDateTableByArray('USER', [this.currentUser]) globalThis.statue = 4 this.isBoardPrePareSetPopupShow = true; this.isFirstBoardPrePareSetPopupBtnShow = true; this.stepFlag = false this.stopDeviceById() - }catch (e){ + } catch (e) { } }) - }else{ + } else { Image($r('app.media.ksks_btn')) .commStyle() .onClick(async () => { @@ -768,19 +787,19 @@ struct UserInfo { // }); // return // } - console.info('surenjun currentUser',JSON.stringify(this.currentUser)) + console.info('surenjun currentUser', JSON.stringify(this.currentUser)) if (globalThis.singlePlay) { const {examSubject} = globalThis.carInfo; - console.info('surenjun => sczbkf',JSON.stringify(this.sczbkf)) + console.info('surenjun => sczbkf', JSON.stringify(this.sczbkf)) this.AccountTable.query('0', (result) => { if (result.length == 0) { this.AccountTable.insertData(this.currentUser, (id) => { this.AccountTable.query('0', (result) => { router.pushUrl({ - url: examSubject == 3 ? 'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', + params: { + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); this.stopDeviceById() @@ -790,10 +809,10 @@ struct UserInfo { this.AccountTable.updateData(this.currentUser, (id) => { this.AccountTable.query('0', (result) => { router.pushUrl({ - url: examSubject == 3?'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', + params: { + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); this.stopDeviceById() @@ -808,7 +827,7 @@ struct UserInfo { } else { this.sfbdinterfaceFn() } - }catch (e){ + } catch (e) { } @@ -860,9 +879,9 @@ struct UserInfo { } // 上车准备弹窗 - if(this.isBoardPrePareSetPopupShow){ + if (this.isBoardPrePareSetPopupShow) { BoardPrePareSetPopup({ - closePopup:(bool)=>{ + closePopup: (bool) => { this.isBoardPrePareSetPopupShow = false; // if(!globalThis.singlePlay){ // this.isFirstBoardPrePareSetPopupBtnShow = !bool; @@ -874,7 +893,7 @@ struct UserInfo { // this.numCount = 0 // this.getExaminationStudentInfoFn() // }, - confirmMark:(kfdm)=>{ + confirmMark: (kfdm) => { this.sczbkf = kfdm } }) From d66793359b1bf7dd90787b4da37950879a6e2999 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Thu, 1 Aug 2024 17:36:42 +0800 Subject: [PATCH 2/2] updataTable --- entry/src/main/ets/pages/UserInfo.ets | 209 +++++++++++--------------- 1 file changed, 84 insertions(+), 125 deletions(-) diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 5e5d5346..ec8e2052 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -17,17 +17,13 @@ import promptAction from '@ohos.promptAction'; import FilePhoto from './judgeSDK/utils/filePhoto'; import { getSyncData, upDateTableByArray } from '../common/service/initable'; import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; -import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup' -import LoadingPopup from './compontents/judge/LoadingPopup'; +import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'; import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; -import { JudgeConfig } from '../config/judge'; import { judgeConfig } from './judgeSDK/utils/judgeConfig'; @Entry @Component struct UserInfo { - private filePhoto: FilePhoto - private avPlayer @State pageIndex: number = 0 @State ratio: number = 1700 / 960 @State index: number = 0 @@ -46,9 +42,12 @@ struct UserInfo { @State isBoardPrePareSetPopupOpen: boolean = false @State isFirstBoardPrePareSetPopupBtnShow: boolean = false @State isBoardPrePareSetPopupShow: boolean = false - @State isLoadingPopupVisible:boolean = false; - @State loadingText:string = '正在生成考试记录,请稍后...' - @State sczbkf:{xmdm:number,kfdm:string}[] = [] + @State isLoadingPopupVisible: boolean = false; + @State loadingText: string = '正在生成考试记录,请稍后...' + @State sczbkf: { + xmdm: number, + kfdm: string + }[] = [] @State currentUser: User = EmptyCandidateObject @State dataList: Array = [] @State list: Array = [] @@ -61,7 +60,7 @@ struct UserInfo { @State idCard: string = ''; @State grantDept: string = ''; //是否已经开始考试 - @State isExamStart:boolean = false; + @State isExamStart: boolean = false; @State effectDate: string = ''; @State interval: any = null; @State studentRefreshStatue: string = '0'; @@ -73,6 +72,20 @@ struct UserInfo { @State FaceOpenStatue: string = '0'; //是否开启人脸识别 subscriber; @State faceCatchImg: string = '' + // 过程照片拍照 + getPhoto = async (empty?: boolean) => { + const singlePlay = globalThis.singlePlay + //单机模式返回空照片 + if (singlePlay) { + return '' + } else { + const {filePhoto} = this; + const photoBase64 = await filePhoto.getPhoto(); + return photoBase64 + } + } + private filePhoto: FilePhoto + private avPlayer private AccountTable = new AccountTable(() => { }, USER); private context = getContext(this) as common.UIAbilityContext; @@ -87,7 +100,7 @@ struct UserInfo { async onPageShow() { const mediaTest = new FilePhoto(this.context); - this.filePhoto = new FilePhoto(this.context); + this.filePhoto = new FilePhoto(this.context); //语音功能 new WebRTCVoice(this.context); //初始化数据 @@ -140,10 +153,10 @@ struct UserInfo { this.stopDeviceById() // globalThis.statue=4 router.pushUrl({ - url: examSubject == 3 ? 'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf + url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', + params: { + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } }, router.RouterMode.Single); return @@ -246,9 +259,9 @@ struct UserInfo { //@ts-ignore syssetParams.forEach(sys => { //364 绕车一周评判时机(1-开始考试后判 2-开始考试前判) - if(sys.v_no === '364'){ - this.isBoardPrePareSetPopupOpen = true; - } + if (sys.v_no === '364') { + this.isBoardPrePareSetPopupOpen = true; + } }) } @@ -474,8 +487,8 @@ struct UserInfo { const carInfo = globalThis.carInfo; const {carId,examinationRoomId} = carInfo; this.showFaceCompare = false - let examItems = {getExaminationItemRsp:{body:{ykxx:''}}}; - if(!globalThis.singlePlay){ + let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; + if (!globalThis.singlePlay) { //获取已考项目 examItems = await getExaminationItem({ time: getCurrentTime(), @@ -487,90 +500,55 @@ struct UserInfo { this.currentUser.id = '1' //是否已经开始考试 // if(!this.isExamStart){ - const code = await this.beginExam(); - if (code != 1) { - return - } - // } - this.AccountTable.query('0', (result) => { - if (result.length == 0) { - this.isExamStart = true - this.AccountTable.insertData(this.currentUser, (id) => { - this.AccountTable.query('0', (result) => { - globalThis.statue = 4 - this.stepFlag = false - router.pushUrl({ - url: 'pages/Judge', - params: { - examItems: examItems?.getExaminationItemRsp?.body?.ykxx , - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf - } - }, router.RouterMode.Single); - this.stopDeviceById() - }) - }) - } else { - this.AccountTable.updateData(this.currentUser, (id) => { - this.AccountTable.query('0', (result) => { - this.stepFlag = false - router.pushUrl({ - url:'pages/Judge', - params: { - examItems: examItems?.getExaminationItemRsp?.body?.ykxx , - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf - } - }, router.RouterMode.Single); - globalThis.statue = 4 - this.stopDeviceById() - }) - }) - } - }) - this.stepFlag = false - } - // 过程照片拍照 - getPhoto = async (empty?: boolean) => { - const singlePlay = globalThis.singlePlay - //单机模式返回空照片 - if (singlePlay) { - return '' - } else { - const {filePhoto} = this; - const photoBase64 = await filePhoto.getPhoto(); - return photoBase64 + const code = await this.beginExam(); + if (code != 1) { + return } + // } + await upDateTableByArray('USER', [this.currentUser]) + globalThis.statue = 4 + this.stepFlag = false + router.pushUrl({ + url: 'pages/Judge', + params: { + examItems: examItems?.getExaminationItemRsp?.body?.ykxx, + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf + } + }, router.RouterMode.Single); + this.stopDeviceById() + this.stepFlag = false } // 检测车门、熄火信号 - async checkSignal():Promise{ + async checkSignal(): Promise { const {isCheckFireOpen} = judgeConfig - return new Promise((resolve,reject)=>{ - if(isCheckFireOpen){ + return new Promise((resolve, reject) => { + if (isCheckFireOpen) { resolve(true) } globalThis.udpClient.onMessage_1(async (msg) => { const msgArr = msg.split(',') const mkg = msgArr[14]; const fdjzs = msgArr[25]; - globalThis.udpClient.onMessage_1(()=>{}); + globalThis.udpClient.onMessage_1(() => { + }); //TODO console.info('surenjun mkg=>', mkg) console.info('surenjun fdjzs=>', fdjzs) - if(mkg == 1){ + if (mkg == 1) { this.avPlayer.playAudio(['voice/关门.mp3']) promptAction.showToast({ - message:'请关闭车门', - duration:4000 + message: '请关闭车门', + duration: 4000 }) reject(false) } - if(fdjzs*1 > 0){ + if (fdjzs * 1 > 0) { this.avPlayer.playAudio(['voice/熄火.mp3']) promptAction.showToast({ - message:'请熄火', - duration:4000 + message: '请熄火', + duration: 4000 }) reject(false) } @@ -578,22 +556,23 @@ struct UserInfo { }) }) } + // 开始考试 - async beginExam(){ + async beginExam() { const carInfo = globalThis.carInfo; const {carId,examinationRoomId} = carInfo; const { examSubject,plateNo } = carInfo; const date = new Date() - console.info('surenjun','photoBase64') + console.info('surenjun', 'photoBase64') const photoBase64 = await this.getPhoto(); - console.info('surenjun','photoBase64End') + console.info('surenjun', 'photoBase64End') const drvexam = { lsh: this.currentUser.lsh || '', kskm: examSubject, ksxtbh: this.ksxtbh || '222', sfzmhm: this.currentUser.sfzmhm || '', ksysfzmhm: this.currentUser.ksy1sfzmhm || '', - ksxl:this.currentUser.ksxl, + ksxl: this.currentUser.ksxl, zp: photoBase64, kssj: dateFormat(date) || '', kchp: decodeURI(plateNo), @@ -734,23 +713,23 @@ struct UserInfo { this.qkFlag = true }) - if( this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow){ + if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) { //上车准备 - Image($r('app.media.sczb_btn')).commStyle().onClick(async ()=>{ + Image($r('app.media.sczb_btn')).commStyle().onClick(async () => { try { await this.checkSignal() this.isExamStart = true - await upDateTableByArray('USER',[this.currentUser]) + await upDateTableByArray('USER', [this.currentUser]) globalThis.statue = 4 this.isBoardPrePareSetPopupShow = true; this.isFirstBoardPrePareSetPopupBtnShow = true; this.stepFlag = false this.stopDeviceById() - }catch (e){ + } catch (e) { } }) - }else{ + } else { Image($r('app.media.ksks_btn')) .commStyle() .onClick(async () => { @@ -768,39 +747,19 @@ struct UserInfo { // }); // return // } - console.info('surenjun currentUser',JSON.stringify(this.currentUser)) + console.info('surenjun currentUser', JSON.stringify(this.currentUser)) if (globalThis.singlePlay) { const {examSubject} = globalThis.carInfo; - console.info('surenjun => sczbkf',JSON.stringify(this.sczbkf)) - this.AccountTable.query('0', (result) => { - if (result.length == 0) { - this.AccountTable.insertData(this.currentUser, (id) => { - this.AccountTable.query('0', (result) => { - router.pushUrl({ - url: examSubject == 3 ? 'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf - } - }, router.RouterMode.Single); - this.stopDeviceById() - }) - }) - } else { - this.AccountTable.updateData(this.currentUser, (id) => { - this.AccountTable.query('0', (result) => { - router.pushUrl({ - url: examSubject == 3?'pages/Roads':'pages/Judge', - params:{ - sczb:Number(this.isBoardPrePareSetPopupOpen), - kfdm:this.sczbkf - } - }, router.RouterMode.Single); - this.stopDeviceById() - }) - }) + console.info('surenjun => sczbkf', JSON.stringify(this.sczbkf)) + await upDateTableByArray('USER', [this.currentUser]) + router.pushUrl({ + url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', + params: { + sczb: Number(this.isBoardPrePareSetPopupOpen), + kfdm: this.sczbkf } - }) + }, router.RouterMode.Single); + this.stopDeviceById() return } if (this.FaceOpenStatue != '0') { @@ -808,7 +767,7 @@ struct UserInfo { } else { this.sfbdinterfaceFn() } - }catch (e){ + } catch (e) { } @@ -860,9 +819,9 @@ struct UserInfo { } // 上车准备弹窗 - if(this.isBoardPrePareSetPopupShow){ + if (this.isBoardPrePareSetPopupShow) { BoardPrePareSetPopup({ - closePopup:(bool)=>{ + closePopup: (bool) => { this.isBoardPrePareSetPopupShow = false; // if(!globalThis.singlePlay){ // this.isFirstBoardPrePareSetPopupBtnShow = !bool; @@ -874,7 +833,7 @@ struct UserInfo { // this.numCount = 0 // this.getExaminationStudentInfoFn() // }, - confirmMark:(kfdm)=>{ + confirmMark: (kfdm) => { this.sczbkf = kfdm } })