From e69b09dc4af318e3bf903fd3f00857b470277cf8 Mon Sep 17 00:00:00 2001 From: wangzhongjie Date: Wed, 9 Apr 2025 14:11:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84=E7=B1=BB=E5=9E=8B=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E5=92=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=80=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/api/judgeNew.ets | 60 ++++++++++-------- entry/src/main/ets/model/Judge.ets | 13 ++++ entry/src/main/ets/model/api.ets | 1 + entry/src/main/ets/pages/ExaminerLogin.ets | 6 +- entry/src/main/ets/pages/Index.ets | 2 +- entry/src/main/ets/pages/Register.ets | 7 ++- entry/src/main/ets/pages/UserInfo.ets | 62 +++++++++---------- .../ets/pages/compontents/FaceCompare.ets | 10 +-- .../judge/BoardPrePareSetPopup.ets | 50 ++++++++------- .../ets/pages/compontents/judge/RealTime.ets | 3 + 10 files changed, 124 insertions(+), 90 deletions(-) diff --git a/entry/src/main/ets/api/judgeNew.ets b/entry/src/main/ets/api/judgeNew.ets index c1c7540e..1df90e8c 100644 --- a/entry/src/main/ets/api/judgeNew.ets +++ b/entry/src/main/ets/api/judgeNew.ets @@ -1,11 +1,17 @@ -import { getSyncData } from '../common/service/initable'; import request from '../utils/Request'; - import http from '@ohos.net.http'; import common from '@ohos.app.ability.common'; -import { DrvexamType, GetJudgeParamsType } from '../model'; +import { + CarInfoType, + DrvexamType, + GetJudgeParamsType, + MASYSSETTableType, + RegulatoryInterfaceParams, + WuxiExamType +} from '../model'; import FileUtils from '../utils/FileUtils'; +import { GetSyncData } from '../utils/table/Operation'; //监管接口序列号映射 const gjxlhObj: Record = { @@ -22,34 +28,35 @@ interface WR { code: number } -export default async function writeObjectOutNew(data, filePath: string): Promise { +export default async function writeObjectOutNew(data: RegulatoryInterfaceParams, filePath: string): Promise { const context: common.UIAbilityContext = AppStorage.get('context') const fileUtil = new FileUtils(context); - // const { jkid, drvexam } = data; const basic = await getBasicConfig(data.jkid); const params = await getParams(data.jkid, data.drvexam); - // const { wglb, jkxlh, glbm, jgbh, sjbs } = basic; if (filePath) { - await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`, JSON.stringify({ + let examData: WuxiExamType = { wglb: basic.wglb, - jkxlh: basic.jkxlh, + jkxlh: basic.jkxlh || "", glbm: basic.glbm, jgbh: basic.jgbh, sjbs: basic.sjbs, data: params.data, file: { - ...params.file, param: [] - }, - })); + sjbs: params.file.sjbs, + // params: [] + } + } + await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`, JSON.stringify(examData)); } // let connectTimeout = sjbs === '02-21-000014' ?60000:1 console.info('surenjun', '调用新监管') let temp: WR try { + const JGHOST: string = AppStorage.get('JGHOST') temp = await request({ - host: globalThis.JGHOST as string, + host: JGHOST, method: http.RequestMethod.POST, //是否是新中心 isNewCenter: true, @@ -86,7 +93,8 @@ export default async function writeObjectOutNew(data, filePath: string): Promise } export async function getParams(jkid: string, drvexam: DrvexamType): Promise { - const examSubject: number = globalThis.carInfo.examSubject; + const carInfo: CarInfoType = AppStorage.get('carInfo')! + const examSubject: string = carInfo.examSubject; switch (jkid) { //开始考试 case '17C51': @@ -97,7 +105,7 @@ export async function getParams(jkid: string, drvexam: DrvexamType): Promise { + const carInfo: CarInfoType = AppStorage.get('carInfo')! + const examSubject: string = carInfo.examSubject; + const syssetParam: MASYSSETTableType[] = await GetSyncData('MA_SYSSET'); + let syssetObj: Record = {}; syssetParam.forEach(sys => { syssetObj[sys.v_no] = decodeURIComponent(sys.v_value) }); - return { + let obj: WuxiExamType = { //外挂类别 - wglb: examSubject == 2 ? "700203" : "700204", - //监管接口序列号 + wglb: examSubject == "2" ? "700203" : "700204", + // //监管接口序列号 jkxlh: syssetObj['901'], //管理部门 glbm: syssetObj['903'], @@ -231,4 +240,5 @@ async function getBasicConfig(jkid) { //接口id sjbs: gjxlhObj[jkid], } + return obj } \ No newline at end of file diff --git a/entry/src/main/ets/model/Judge.ets b/entry/src/main/ets/model/Judge.ets index e5c183c7..23572f45 100644 --- a/entry/src/main/ets/model/Judge.ets +++ b/entry/src/main/ets/model/Judge.ets @@ -805,3 +805,16 @@ export interface WR { } +// 无锡所数据 +export interface WuxiExamType { + wglb: string + jkxlh: string, + glbm: string, + jgbh: string, + sjbs: string, + data?: JudgeData, + file?: JudgeFile +} + + + diff --git a/entry/src/main/ets/model/api.ets b/entry/src/main/ets/model/api.ets index eb214d42..d3a1d4e8 100644 --- a/entry/src/main/ets/model/api.ets +++ b/entry/src/main/ets/model/api.ets @@ -51,6 +51,7 @@ export interface TimeSynchronizationRspBody { paraKdid?: string kdid?: string } + export interface examinerLoginRsp { bz1?: string; fieldid?: string diff --git a/entry/src/main/ets/pages/ExaminerLogin.ets b/entry/src/main/ets/pages/ExaminerLogin.ets index 0f014f77..dd0068a4 100644 --- a/entry/src/main/ets/pages/ExaminerLogin.ets +++ b/entry/src/main/ets/pages/ExaminerLogin.ets @@ -130,7 +130,11 @@ struct Index { }, router.RouterMode.Single); console.log('res11', JSON.stringify(res)) - const examinerLoginInfo: ExaminerLoginInfo = res.examinerLoginRsp.body + const examinerLoginInfo: ExaminerLoginInfo | undefined = res.examinerLoginRsp?.body; + if (!examinerLoginInfo) { + console.error('examinerLoginRsp.body is undefined'); + return; + } examinerLoginInfo.username = this.inputTextArr[0] AppStorage.setOrCreate('examinerInfo', examinerLoginInfo) }).catch((err: BusinessError) => { diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 7b144943..8fcee223 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -60,7 +60,7 @@ struct Index { private fileHelper!: FileHelper private interval = -1; private avPlayer!: VoiceAnnounce - private timeInfo: TimeSynchronizationRspBody + private timeInfo!: TimeSynchronizationRspBody private context = getContext(this) as common.UIAbilityContext; async aboutToAppear() { diff --git a/entry/src/main/ets/pages/Register.ets b/entry/src/main/ets/pages/Register.ets index d8197b28..518f974e 100644 --- a/entry/src/main/ets/pages/Register.ets +++ b/entry/src/main/ets/pages/Register.ets @@ -1,12 +1,12 @@ import TopLogo from './compontents/TopLogo' import { registrationDeviceNo } from '../api/checkCar' import deviceManager from '@ohos.distributedHardware.deviceManager' -import promptAction from '@ohos.promptAction' import common from '@ohos.app.ability.common' import { ApiResponseType, DeviceParamType } from '../model' import dayTs from '../utils/Date' import FileUtils from '../utils/FileUtils' +import Prompt from '@system.prompt' @Entry @Component @@ -128,8 +128,9 @@ struct Index { AppStorage.setOrCreate('deviceNo', this.ip) // upDateTableByArray('DeviceInfoTable', [{ deviceId: this.ip }]) registrationDeviceNo(param).then((res: ApiResponseType) => { - if (res.registrationDeviceNoRsp.head.resultCode == '0') { - promptAction.showToast({ + if (res.registrationDeviceNoRsp && res.registrationDeviceNoRsp.head && + res.registrationDeviceNoRsp.head.resultCode == '0') { + Prompt.showToast({ message: decodeURIComponent(res.registrationDeviceNoRsp.head.resultMessage), duration: 3000 }); diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index f2529a74..508b2ff4 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -187,18 +187,18 @@ struct UserInfo { alignment: DialogAlignment.Center, }, ) - private filePhoto: FilePhoto + private filePhoto!: FilePhoto // 过程照片拍照 getPhoto = async () => { //单机模式返回空照片 if (this.singlePlay) { return '' } else { - const photoBase64: string = await this.filePhoto.getPhoto(); + const photoBase64: string = (await this.filePhoto.getPhoto()) || ""; return photoBase64 } } - private avPlayer: VoiceAnnounce + private avPlayer!: VoiceAnnounce private context = getContext(this) as common.UIAbilityContext; private labelBlocks: LabelBlockType[] = [ { label: '考生姓名', key: 'xm' }, @@ -220,9 +220,9 @@ struct UserInfo { this.ksksLimit = false this.currentUser = EmptyCandidateObject this.filePhoto = new FilePhoto(this.context); - this.singlePlay = AppStorage.get('singlePlay') - this.examinerLoginInfo = AppStorage.get('examinerInfo') - this.carInfo = AppStorage.get('carInfo') + this.singlePlay = AppStorage.get('singlePlay') || false + this.examinerLoginInfo = AppStorage.get('examinerInfo')! + this.carInfo = AppStorage.get('carInfo')! //语音功能on // new WebRTCVoice(this.context); //初始化数据 @@ -264,7 +264,7 @@ struct UserInfo { if (this.dataList.length) { setTimeout(() => { this.currentUser = this.dataList[0] - this.currentUser.ksy2 = this.examinerLoginInfo.kgxm + this.currentUser.ksy2 = this.examinerLoginInfo.kgxm || "" AppStorage.setOrCreate('lsh', this.currentUser.lsh) }, 200) } else { @@ -341,7 +341,7 @@ struct UserInfo { this.currentUser = EmptyCandidateObject setTimeout(() => { this.currentUser = res - this.currentUser.ksy2 = this.examinerLoginInfo.kgxm + this.currentUser.ksy2 = this.examinerLoginInfo.kgxm || "" }, 200) this.examinerLoginInfo.ksyh = res.ksy1sfzmhm @@ -371,7 +371,7 @@ struct UserInfo { await SqlInsertTable('USER', []) setTimeout(() => { this.currentUser = this.list[0] - this.currentUser.ksy2 = this.examinerLoginInfo.kgxm + this.currentUser.ksy2 = this.examinerLoginInfo.kgxm || "" AppStorage.setOrCreate('lsh', this.currentUser.lsh) }, 200) @@ -384,7 +384,7 @@ struct UserInfo { onReadCard(ret: IDCardSDK.IDCardInfo) { console.info(`zzctest xx Read Card ret =${ret.status}`) - let thisVar: IdCard = AppStorage.get('indexComponent'); + let thisVar: IdCard = AppStorage.get('indexComponent')!; if (ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。 @@ -517,28 +517,28 @@ struct UserInfo { // this.fileUtil.addFile("temp.log", JSON.stringify(syssetParams)) syssetParams.forEach(sys => { //364 绕车一周评判时机(1-开始考试后判 2-开始考试前判) - if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') { - this.systemParam.Param364 = sys.v_value + if (sys.v_no === '364' && decodeURIComponent(sys.v_value || "") == '2') { + this.systemParam.Param364 = sys.v_value || "" that.isBoardPrePareSetPopupOpen = true; that.isFirstBoardPrePareSetPopupBtnShow = false } //398参数为1 第二场考试上车准备不考 - if (sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1') { - that.systemParam.Param398 = decodeURIComponent(sys.v_value) + if (sys.v_no === '398' && decodeURIComponent(sys.v_value || "") == '1') { + that.systemParam.Param398 = decodeURIComponent(sys.v_value || "") that.isSecondBoardPrePareSetPopupOpen = true; } // 车上没有缺考功能 if (sys.v_no === '770') { - that.systemParam.Param770Str = sys.v_value; + that.systemParam.Param770Str = sys.v_value || ""; } // 开始考试前必须解开安全带或关车门 if (sys.v_no === '803') { that.systemParam.Param803Str = sys.v_value + ''; } //判断是否考生是否按顺序考试 - if (sys.v_no === '341' && decodeURIComponent(sys.v_value) == '1') { + if (sys.v_no === '341' && decodeURIComponent(sys.v_value || "") == '1') { that.systemParam.Param341 = true } else { //todo @@ -546,15 +546,15 @@ struct UserInfo { } //开始考试触发方式 if (sys.v_no === '612') { - that.systemParam.Param612Str = decodeURIComponent(sys.v_value) + that.systemParam.Param612Str = decodeURIComponent(sys.v_value || "") } //车上考试过一次就不能缺考 if (sys.v_no === '352') { - that.systemParam.Param352Str = decodeURIComponent(sys.v_value) + that.systemParam.Param352Str = decodeURIComponent(sys.v_value || "") } //828考生待考界面,安全员显示考试员 if (sys.v_no === '828') { - that.systemParam.Param828Str = decodeURIComponent(sys.v_value) + that.systemParam.Param828Str = decodeURIComponent(sys.v_value || "") if (that.systemParam.Param828Str == '1') { that.labelBlocks[5].label = '安全员名' } else { @@ -565,7 +565,7 @@ struct UserInfo { } //视频保存天数 if (sys.v_no === '305') { - that.systemParam.Param305Str = decodeURIComponent(sys.v_value) + that.systemParam.Param305Str = decodeURIComponent(sys.v_value || "") if (!Number(this.systemParam.Param305Str)) { that.systemParam.Param305Str = '2' } @@ -654,9 +654,9 @@ struct UserInfo { this.type = '2' this.errorDialog.open() this.updateTimeLimit = true - let md5Message: string = CryptoJS.MD5(this.carInfo.carId + - this.carInfo.examinationRoomId + - this.examinerLoginInfo.username).toString(); + let md5Message: string = CryptoJS.MD5(this.carInfo.carId! + + this.carInfo.examinationRoomId! + + this.examinerLoginInfo.username!).toString(); const param = `${md5Message}${this.carInfo.carId}${this.carInfo.examinationRoomId}${this.examinerLoginInfo.username}` try { @@ -712,10 +712,10 @@ struct UserInfo { }); if (this.systemParam.Param828Str == '1' || this.systemParam.Param828Str == '2') { // listData.ksy2=listData.ksy1; - listData.ksy2 = this.examinerLoginInfo.kgxm + listData.ksy2 = this.examinerLoginInfo.kgxm || "" } else { // listData.ksy2=listData.ksy2; - listData.ksy2 = this.examinerLoginInfo.kgxm + listData.ksy2 = this.examinerLoginInfo.kgxm || "" } listData.kszp = this.photo + listData.kszp listData.ksmjzp = this.photo + listData.ksmjzp @@ -737,7 +737,7 @@ struct UserInfo { if (this.dataList.length) { setTimeout(() => { this.currentUser = user.length ? user[0] : this.dataList[0] - this.currentUser.ksy2 = this.examinerLoginInfo.kgxm + this.currentUser.ksy2 = this.examinerLoginInfo.kgxm || "" AppStorage.setOrCreate('lsh', this.currentUser.lsh) this.examinerLoginInfo.ksyh = this.currentUser.ksy1sfzmhm AppStorage.setOrCreate('examinerInfo', this.examinerLoginInfo) @@ -787,10 +787,10 @@ struct UserInfo { } console.log('JsonJson', JSON.stringify(this.currentUser)) const param: ExaminationStuAbsentParams = { - carId: this.carInfo.carId, + carId: this.carInfo.carId || "", sfzmhm: this.currentUser.sfzmhm, - examinationRoomId: this.carInfo.examinationRoomId, - username: this.examinerLoginInfo.username, + examinationRoomId: this.carInfo.examinationRoomId || "", + username: this.examinerLoginInfo.username || "", lsh: this.lsh } console.log('carNo1111', param) @@ -804,8 +804,8 @@ struct UserInfo { const param: UDPParamType = { id: 43, list: tmpList, - carNo: this.carInfo.carNo, - placeId: this.carInfo.examinationRoomId + carNo: this.carInfo.carNo || "", + placeId: this.carInfo.examinationRoomId || "" } CenterUDPClientInstance.sendData(param) // globalThis.udpClient2.sendMsgExt(param, this.context) diff --git a/entry/src/main/ets/pages/compontents/FaceCompare.ets b/entry/src/main/ets/pages/compontents/FaceCompare.ets index aefbf692..807f5a5e 100644 --- a/entry/src/main/ets/pages/compontents/FaceCompare.ets +++ b/entry/src/main/ets/pages/compontents/FaceCompare.ets @@ -190,7 +190,7 @@ export default struct FaceCompare { console.log('mmmmm0', 2) this.param.pztd = this.param.rlls const data = await takePhoto(this.param, this.context, 'jt/', 1,) - this.base64 = this.imageBase64 + data.base64 + this.base64 = this.imageBase64 + (data.base64 || "") console.log('mmmmt', this.base64) faceCompare({ sfzh: this.sfzh, @@ -238,8 +238,8 @@ export default struct FaceCompare { const param: UDPParamType = { id: 46, list: tmpList, - carNo: this.carInfo.carNo, - placeId: this.carInfo.examinationRoomId, + carNo: this.carInfo.carNo || "", + placeId: this.carInfo.examinationRoomId || "", sendCallback: () => { this.callBackFlag = true } @@ -253,8 +253,8 @@ export default struct FaceCompare { const param2: UDPParamType = { id: 47, list: tmpList, - carNo: this.carInfo.carNo, - placeId: this.carInfo.examinationRoomId, + carNo: this.carInfo.carNo || "", + placeId: this.carInfo.examinationRoomId || "", } CenterUDPClientInstance.sendData(param2) } diff --git a/entry/src/main/ets/pages/compontents/judge/BoardPrePareSetPopup.ets b/entry/src/main/ets/pages/compontents/judge/BoardPrePareSetPopup.ets index 8cbc93a1..5e72014c 100644 --- a/entry/src/main/ets/pages/compontents/judge/BoardPrePareSetPopup.ets +++ b/entry/src/main/ets/pages/compontents/judge/BoardPrePareSetPopup.ets @@ -68,23 +68,23 @@ export default struct DeductedPopup { bgColor: '#B36E00' } private context = getContext(this) as common.UIAbilityContext; - private judgeTask: JudgeTask - private filePhoto: FilePhoto + private judgeTask!: JudgeTask + private filePhoto!: FilePhoto // 过程照片拍照 getPhoto = async (empty?: boolean) => { //单机模式返回空照片 if (this.singlePlay) { return '' } else { - const photoBase64: string = await this.filePhoto.getPhoto(); + const photoBase64: string = await this.filePhoto.getPhoto() || ""; return photoBase64 } } - private avPlayer: VoiceAnnounce + private avPlayer!: VoiceAnnounce async aboutToAppear() { - this.carInfo = AppStorage.get('carInfo') - this.singlePlay = AppStorage.get('singlePlay') + this.carInfo = AppStorage.get('carInfo')! + this.singlePlay = AppStorage.get('singlePlay')! this.avPlayer = new VoiceAnnounce(this.context); this.judgeTask = new JudgeTask(); const mediaTest = new FilePhoto(this.context); @@ -136,10 +136,10 @@ export default struct DeductedPopup { // const { judgeConfigObj, kssycs, avPlayer, judgeTask } = this; this.kfdmArr.push({ xmdm: 1, - kfdm: mark.markserial, - markreal: mark.markreal, - markcatalog: mark.markcatalog, - score: mark.score + kfdm: mark.markserial || "", + markreal: mark.markreal || 0, + markcatalog: mark.markcatalog || "", + score: mark.score || 0 }) const kfdmArr = this.kfdmArr @@ -156,7 +156,7 @@ export default struct DeductedPopup { // }))) if (this.judgeConfigObj['418'] == '1' || JudgeConfig.kfVoiceOpen) { - this.avPlayer.playAudio([`voice/${mark.markcatalog}.mp3`, `voice/mark_${Math.abs(mark.score)}.mp3`], false, + this.avPlayer.playAudio([`voice/${mark.markcatalog}.mp3`, `voice/mark_${Math.abs(mark.score!)}.mp3`], false, () => { this.closePopup(true) }); @@ -185,7 +185,7 @@ export default struct DeductedPopup { sfzmhm: this.idCard, ksxm: '40100', ksxl: this.ksxl, - kchp: decodeURI(this.carInfo.plateNo), + kchp: decodeURI(this.carInfo.plateNo || ""), ksdd: decodeURI(this.ksdd), kslx: decodeURI(this.kslx) || '', kssj: time @@ -215,7 +215,7 @@ export default struct DeductedPopup { kskm: this.carInfo.examSubject, ksxm: '40100', sfzmhm: this.idCard, - kchp: decodeURI(this.carInfo.plateNo), + kchp: decodeURI(this.carInfo.plateNo || ""), zpsj: time, // zp: encodeURIComponent(photoBase64), zp: photoBase64, @@ -244,7 +244,7 @@ export default struct DeductedPopup { kfxm: kf.markcatalog, kfxmmx: `${'1'},${kf.kfdm}`, sfzmhm: this.idCard, - kchp: decodeURI(this.carInfo.plateNo), + kchp: decodeURI(this.carInfo.plateNo || ""), kffs: 2, ksdd: decodeURI(this.ksdd), kfsj: time @@ -267,7 +267,7 @@ export default struct DeductedPopup { ksxm: '40100', czlx: '1', ksxl: this.ksxl, - kchp: decodeURI(this.carInfo.plateNo), + kchp: decodeURI(this.carInfo.plateNo || ""), ksdd: decodeURI(this.ksdd), kslx: encodeURI(this.kslx) || '', jssj: time @@ -286,7 +286,7 @@ export default struct DeductedPopup { jkid: '17C56', drvexam: { lsh: this.lsh, - kchp: decodeURI(this.carInfo.plateNo), + kchp: decodeURI(this.carInfo.plateNo || ""), kskm: this.carInfo.examSubject, sfzmhm: this.idCard, // zp: encodeURIComponent(photoBase64), @@ -316,7 +316,9 @@ export default struct DeductedPopup { this.avPlayer.playAudio(['voice/上车准备.mp3']) } } - this.judgeConfigObj[sys.v_no] = decodeURIComponent(sys.v_value) + if (sys.v_no) { + this.judgeConfigObj[sys.v_no] = decodeURIComponent(sys.v_value || ''); + } }) } @@ -325,15 +327,15 @@ export default struct DeductedPopup { const markRuleParams = markRules || (await GetSyncData('MA_MARKRULE') as MarkRule[]) markRuleParams.forEach(mark => { const tempObj: MarkRule = { - itemno: mark.itemno * 1, + itemno: Number(mark.itemno), markcatalog: mark.markcatalog, - markshow: decodeURI(mark.markshow), - markreal: mark.markreal * 1, - markstandard: mark.markstandard * 1, + markshow: decodeURI(mark.markshow || ""), + markreal: Number(mark.markreal), + markstandard: Number(mark.markstandard), markserial: mark.markserial, kfxh: mark.kfxh, - OnlyOneKind: mark.onlyoneid * 1, - NoCancelId: mark.nocancelid * 1, + OnlyOneKind: Number(mark.onlyoneid), + NoCancelId: Number(mark.nocancelid), GPS_SID: mark.gps_sid == 0 ? false : true } @@ -370,7 +372,7 @@ export default struct DeductedPopup { this.kszp = stuInfo.kszp; this.ksdd = stuInfo.ksdd; this.kssycs = stuInfo.kssycs; - this.kslx = stuInfo.kslx; + this.kslx = stuInfo.kslx || ""; this.ksxl = stuInfo.ksxl; } diff --git a/entry/src/main/ets/pages/compontents/judge/RealTime.ets b/entry/src/main/ets/pages/compontents/judge/RealTime.ets index 6bc47ee0..44c79616 100644 --- a/entry/src/main/ets/pages/compontents/judge/RealTime.ets +++ b/entry/src/main/ets/pages/compontents/judge/RealTime.ets @@ -12,6 +12,9 @@ // } @Component export default struct RealTime { + private widthNumber: string | number | Resource = 0 + private heightNumber: string | number | Resource = 0 + build() { } }