feat: 文件名规范化
This commit is contained in:
		
							parent
							
								
									fa28b48533
								
							
						
					
					
						commit
						7e10635a22
					
				| @ -5,9 +5,9 @@ | ||||
|         "name": "default", | ||||
|         "material": { | ||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", | ||||
|           "storePassword": "0000001A3E7D97C4BC5819BCBC0470AB1397AAD09AC6E70069CFC6FD7D21A58A50AA6EE3FEBCDA027D71", | ||||
|           "storePassword": "0000001AAD87A2F96608A7CC63E6F839F8911407DD89270AAF9DE1E71573F9635276984E1FAF888B3B65", | ||||
|           "keyAlias": "debugKey", | ||||
|           "keyPassword": "0000001A764ACBDC861BE169BE8B85E333F52659116CD5B8F12254C0F8F893E26884787B99199D49B10C", | ||||
|           "keyPassword": "0000001A4B890623B78CD2603888F1077C048A19AD5577A34A4A2C54492F54091134D30F5FC8DB4D2E1F", | ||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b", | ||||
|           "signAlg": "SHA256withECDSA", | ||||
|           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12" | ||||
|  | ||||
| @ -18,6 +18,7 @@ import testNapi from "@ohos.idcard"; | ||||
| import common from '@ohos.app.ability.common'; | ||||
| import { VideoConfig } from './interfaces' | ||||
| import WebRTCVoice from './webRTC/' | ||||
| 
 | ||||
| @Entry | ||||
| @Component | ||||
| struct Index { | ||||
| @ -82,9 +83,7 @@ struct Index { | ||||
|   } | ||||
|   private AccountTable = new AccountTable(() => { | ||||
|   }, USER); | ||||
| 
 | ||||
|   private context = getContext(this) as common.UIAbilityContext; | ||||
| 
 | ||||
|   @State name: string = 'initName'; | ||||
|   @State sex: string = ''; | ||||
|   @State callBackFlag: boolean = false; | ||||
| @ -105,6 +104,7 @@ struct Index { | ||||
|   @State isCanClick: boolean = true; | ||||
|   subscriber; | ||||
|   @State faceCatchImg: string = '' | ||||
| 
 | ||||
|   //  private fileUtil: FileUtil | ||||
|   // that.sfzmhm = 'surenjun'; | ||||
| 
 | ||||
| @ -144,7 +144,6 @@ struct Index { | ||||
|     this.numCount = 0 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     globalThis.udpClient2 && globalThis.udpClient2.onMessage((val) => { | ||||
|       console.log('valvaltotol2', val.id, val.body, val.length) | ||||
| 
 | ||||
| @ -422,16 +421,24 @@ struct Index { | ||||
|     this.initSysset() | ||||
|     initJudgeUdp() | ||||
|   } | ||||
| 
 | ||||
|   changeQkfn() { | ||||
|     this.qkFn() | ||||
|   } | ||||
| 
 | ||||
|   getqkFn() { | ||||
|     let tmpList = []; | ||||
|     tmpList.push(this.string2Bytes(globalThis.signNum, 1 * 8)[0]) | ||||
|     const param= {id: 41,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRoomId} | ||||
|     const param = { | ||||
|       id: 41, | ||||
|       list: tmpList, | ||||
|       carNo: globalThis.carInfo.carNo, | ||||
|       placeId: globalThis.carInfo.examinationRoomId | ||||
|     } | ||||
| 
 | ||||
|     globalThis.udpClient2.sendMsg(param, this.context) | ||||
|   } | ||||
| 
 | ||||
|   async heartMsg(context) { | ||||
|     let tmpList = [] | ||||
|     const str = globalThis.lsh | ||||
| @ -439,14 +446,25 @@ struct Index { | ||||
|       tmpList.push(this.string2Bytes(str.charCodeAt(i), 1 * 8)[0]) | ||||
|     } | ||||
| 
 | ||||
|     const param = { id: 46, list: tmpList, carNo: globalThis.carInfo.carNo, placeId: globalThis.carInfo.examinationRoomId,callback:()=>{ | ||||
|     const param = { | ||||
|       id: 46, | ||||
|       list: tmpList, | ||||
|       carNo: globalThis.carInfo.carNo, | ||||
|       placeId: globalThis.carInfo.examinationRoomId, | ||||
|       callback: () => { | ||||
|         console.log('46send') | ||||
|         this.callBackFlag = true | ||||
|     }} | ||||
|       } | ||||
|     } | ||||
|     this.interval = setInterval(() => { | ||||
|       if (this.callBackFlag) { | ||||
|         console.log('validqqq333') | ||||
|         const param2 = { id: 47, list: tmpList, carNo: globalThis.carInfo.carNo, placeId: globalThis.carInfo.examinationRoomId } | ||||
|         const param2 = { | ||||
|           id: 47, | ||||
|           list: tmpList, | ||||
|           carNo: globalThis.carInfo.carNo, | ||||
|           placeId: globalThis.carInfo.examinationRoomId | ||||
|         } | ||||
|         globalThis.udpClient2 && globalThis.udpClient2.sendMsg(param2, this.context) | ||||
|       } | ||||
|     }, 1000) | ||||
| @ -456,12 +474,14 @@ struct Index { | ||||
| 
 | ||||
|     // return {id: 31,list:tmpList,carNo:489,placeId:62} | ||||
|   } | ||||
| 
 | ||||
|   aboutToDisappear() { | ||||
|     clearInterval(this.interval) | ||||
|     clearInterval(this.interval2) | ||||
|     testNapi.StopReadCard(); | ||||
|     // console.log("zzctest Close Device ret = " + testNapi.CloseDevice()); | ||||
|   } | ||||
| 
 | ||||
|   changeStudentStatue(val) { | ||||
|     const arr = [globalThis.signNum || 0, val] | ||||
|     let tmpList = []; | ||||
| @ -478,15 +498,22 @@ struct Index { | ||||
|     // const param = { id: 46, list: tmpList, carNo: globalThis.carInfo.carNo, placeId: globalThis.carInfo.examinationRoomId,callback:()=>{ | ||||
| 
 | ||||
|     // const param = { id: 46, list: tmpList, carNo: 489, placeId: 62 } | ||||
|     const param= {id: 31,list:tmpList,carNo:globalThis.carInfo.carNo,placeId:globalThis.carInfo.examinationRoomId} | ||||
|     const param = { | ||||
|       id: 31, | ||||
|       list: tmpList, | ||||
|       carNo: globalThis.carInfo.carNo, | ||||
|       placeId: globalThis.carInfo.examinationRoomId | ||||
|     } | ||||
| 
 | ||||
|     globalThis.udpClient2 && globalThis.udpClient2.sendMsg(param, this.context) | ||||
|   } | ||||
| 
 | ||||
|   facePass() { | ||||
|     if (!this.stepFlag) { | ||||
|       this.sfbdinterfaceFn() | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   onReadCard(ret) { | ||||
|     console.info(`zzctest xx Read Card ret =${ret.status}`) | ||||
|     let thisVar = globalThis.indexComponent; | ||||
| @ -539,9 +566,11 @@ struct Index { | ||||
|     console.info(`zzctest Read Card end`); | ||||
|     return true; | ||||
|   } | ||||
| 
 | ||||
|   async initSysset() { | ||||
|     const that = this; | ||||
|     const db = new AccountTable(()=>{},MA_SYSSET); | ||||
|     const db = new AccountTable(() => { | ||||
|     }, MA_SYSSET); | ||||
|     db.getRdbStore(() => { | ||||
|       db.query('0', (syssetParams) => { | ||||
|         const serialNumberArr = syssetParams.filter(sys => sys.v_no === '901') | ||||
| @ -571,6 +600,7 @@ struct Index { | ||||
|       }) | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
|   // async getVideoConfig(){ | ||||
|   //   const data = await this.fileUtil.readFile('/mnt/hmdfs/100/account/device_view/localfiles/files/logs/config/config3.txt'); | ||||
|   //   this.param=JSON.parse(data) | ||||
| @ -606,6 +636,7 @@ struct Index { | ||||
|     this.pageIndex--; | ||||
|     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||
|   } | ||||
| 
 | ||||
|   getCurrentStudent(id) { | ||||
|     let flag = false | ||||
|     this.pageIndex | ||||
| @ -640,6 +671,7 @@ struct Index { | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   getExaminationStudentInfoFn() { | ||||
|     if (globalThis.singlePlay) { | ||||
|       return | ||||
| @ -751,6 +783,7 @@ struct Index { | ||||
|       console.log('error12error' + error) | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
|   fillZero(str, len) { | ||||
|     str = str + ''; | ||||
|     if (str.length > len || !len) { | ||||
| @ -765,6 +798,7 @@ struct Index { | ||||
| 
 | ||||
|     return zeroStr + str; | ||||
|   } | ||||
| 
 | ||||
|   string2Bytes(number, len) { | ||||
|     // console.log('string2Bytes == ', number) | ||||
|     let str = (+number).toString(2); | ||||
| @ -788,6 +822,7 @@ struct Index { | ||||
|     } | ||||
|     return arrBytes; | ||||
|   } | ||||
| 
 | ||||
|   getPhotosForOtherFn(data, type) { | ||||
|     const date = new Date() | ||||
|     const param = { | ||||
| @ -804,6 +839,7 @@ struct Index { | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
|   qkFn() { | ||||
|     this.faceCompareSucess = 0 | ||||
| 
 | ||||
| @ -828,7 +864,12 @@ struct Index { | ||||
|       // } | ||||
|       // const param = { id: 46, list: tmpList, carNo: 489, placeId: 62 } | ||||
|       console.log('globalThis.signNum', globalThis.signNum) | ||||
|       const param= {id: 43,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRoomId} | ||||
|       const param = { | ||||
|         id: 43, | ||||
|         list: tmpList, | ||||
|         carNo: globalThis.carInfo.carNo, | ||||
|         placeId: globalThis.carInfo.examinationRoomId | ||||
|       } | ||||
| 
 | ||||
|       globalThis.udpClient2.sendMsg(param, this.context) | ||||
|       if (res.examinationStuAbsentRsp.head.resultCode == '0') { | ||||
| @ -867,12 +908,12 @@ struct Index { | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   outClick() { | ||||
|     testNapi.StopReadCard(); | ||||
|     // console.log("zzctest Close Device ret = " + testNapi.CloseDevice()); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   async sfbdinterfaceFn() { | ||||
|     this.stepFlag = true | ||||
|     console.info('surenjun', this.currentUser.lsh) | ||||
| @ -1097,6 +1138,7 @@ struct Index { | ||||
|               .margin({ left: 8 * this.ratio }) | ||||
|               .align(Alignment.Center) | ||||
|             }.margin({ bottom: 10 * this.ratio }) | ||||
| 
 | ||||
|             Row() { | ||||
|               Text('待考次数').fontSize(16 * this.ratio).fontColor('#99948A') | ||||
|               Row() { | ||||
| @ -1141,7 +1183,8 @@ struct Index { | ||||
|             .height(69 * this.ratio) | ||||
|             .backgroundImage($r('app.media.button_nor')) | ||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|             .margin({ bottom: 12 * this.ratio }).onClick(()=>{ | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               // this.getCurrentStudent('3423231995014700007') | ||||
|               // this.vocObj.playAudio({ | ||||
|               //   type: 1, | ||||
| @ -1158,7 +1201,8 @@ struct Index { | ||||
|             .height(69 * this.ratio) | ||||
|             .backgroundImage($r('app.media.button_nor')) | ||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|             .margin({ bottom: 12 * this.ratio }).onClick(()=>{ | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               this.faceCompareSucess = 0 | ||||
|               this.numCount = 0 | ||||
|               this.getExaminationStudentInfoFn() | ||||
| @ -1234,12 +1278,23 @@ struct Index { | ||||
|             }) | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       if (this.showFaceCompare) { | ||||
|         FaceCompare({ showFaceCompare: $showFaceCompare,  sfzh: this.currentUser.sfzmhm, firstImage:this.currentUser.kszp,faceCompareSucess: $faceCompareSucess,getqkFlag:$getqkFlag,faceCatchImg:$faceCatchImg,lsh:globalThis.lsh }) | ||||
|         FaceCompare({ | ||||
|           showFaceCompare: $showFaceCompare, | ||||
|           sfzh: this.currentUser.sfzmhm, | ||||
|           firstImage: this.currentUser.kszp, | ||||
|           faceCompareSucess: $faceCompareSucess, | ||||
|           getqkFlag: $getqkFlag, | ||||
|           faceCatchImg: $faceCatchImg, | ||||
|           lsh: globalThis.lsh | ||||
|         }) | ||||
|       } | ||||
|       if (this.qkFlag) { | ||||
|         Column() { | ||||
|           Text('确认考生:'+this.currentUser.xm+'是否缺考').fontSize(28*this.ratio).position({x:160*this.ratio,y:122*this.ratio}) | ||||
|           Text('确认考生:' + this.currentUser.xm + '是否缺考') | ||||
|             .fontSize(28 * this.ratio) | ||||
|             .position({ x: 160 * this.ratio, y: 122 * this.ratio }) | ||||
|           Row() { | ||||
|             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||
|               Text('  取   消  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) | ||||
| @ -1248,9 +1303,11 @@ struct Index { | ||||
|             .height(69 * this.ratio) | ||||
|             .backgroundImage($r('app.media.button_nor')) | ||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|             .margin({ bottom: 12 * this.ratio }).onClick(()=>{ | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               this.qkFlag = false | ||||
|             }) | ||||
| 
 | ||||
|             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||
|               Text('  确   定  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) | ||||
|             } | ||||
| @ -1258,19 +1315,19 @@ struct Index { | ||||
|             .height(69 * this.ratio) | ||||
|             .backgroundImage($r('app.media.button_nor')) | ||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|             .margin({ bottom: 12 * this.ratio }).onClick(()=>{ | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               this.qkFn() | ||||
|             }) | ||||
|           }.position({ y: 265 * this.ratio, x: 115 * this.ratio }) | ||||
| 
 | ||||
|         }.width(660 * this.ratio) | ||||
|         } | ||||
|         .width(660 * this.ratio) | ||||
|         .height(360 * this.ratio) | ||||
|         .position({ x: 150 * this.ratio, y: 98 * this.ratio }) | ||||
|         .backgroundColor('#E6E3DF') | ||||
|         .borderRadius(19 * this.ratio) | ||||
|       } | ||||
| 
 | ||||
| 
 | ||||
|     } | ||||
|     .height('100%') | ||||
|     .width('100%') | ||||
|  | ||||
| @ -6,7 +6,7 @@ | ||||
|     "pages/UserInfo", | ||||
|     "pages/register", | ||||
|     "pages/Settings", | ||||
|     "pages/TeminalInfos", | ||||
|     "pages/TerminalInfo", | ||||
|     "pages/VideoConfig", | ||||
|     "pages/Hello", | ||||
|     "pages/Judge", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user