fix: 提交一个声明文件
This commit is contained in:
		
							parent
							
								
									520e29fbf9
								
							
						
					
					
						commit
						a0a93fd347
					
				| @ -3,7 +3,7 @@ import { carConfigurationInfo, uploadExamCarCheckResult } from '../api/checkCar' | ||||
| import TopLogo from './compontents/TopLogo'; | ||||
| import testNapi from '@ohos.hiserialsdk'; | ||||
| import { DwMapData, PassData, RealNumData, StackValueData, WarnFlagData, WarnFlagTipData } from '../mock'; | ||||
| import { BaseInfoType, RouteParamsType } from '../model/Common'; | ||||
| import { RouteParamsType } from '../model/Common'; | ||||
| import { CarCheckDataType, CarConfigurationParams, CarInfoType } from '../model'; | ||||
| import { BusinessError } from '@ohos.base'; | ||||
| import { voiceService } from '../utils/Voice'; | ||||
| @ -149,12 +149,12 @@ struct Index { | ||||
|       this.checkListCopy = JSON.parse(JSON.stringify(this.checkList)) | ||||
|       return | ||||
|     } | ||||
|     const baseInfo = AppStorage.get<BaseInfoType>("baseInfo") | ||||
|     const deviceNo = AppStorage.get<string>("deviceNo") | ||||
|     //模拟真实数据 | ||||
|     const param: CarConfigurationParams = { | ||||
|       body: { | ||||
|         "carIdString": this.carInfo.carId || "", //考车ID | ||||
|         "deviceNo": baseInfo?.deviceNo || "" | ||||
|         "deviceNo": deviceNo || "" | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -126,7 +126,6 @@ struct Index { | ||||
|     const folderPath = await fileUtil.initFolder(`/config`); | ||||
|     fileUtil.addFile(`${folderPath}/deviceNo.txt`, JSON.stringify(param)) | ||||
|     AppStorage.setOrCreate<string>('deviceNo', this.ip) | ||||
|     // upDateTableByArray('DeviceInfoTable', [{ deviceId: this.ip }]) | ||||
|     registrationDeviceNo(param).then((res: ApiResponseType) => { | ||||
|       if (res.registrationDeviceNoRsp && res.registrationDeviceNoRsp.head && | ||||
|         res.registrationDeviceNoRsp.head.resultCode == '0') { | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
| 
 | ||||
| import common from '@ohos.app.ability.common'; | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| import { GlobalConfig } from '../config/index'; | ||||
| @ -51,6 +50,46 @@ struct Index { | ||||
|   ] | ||||
|   private inputController: TextInputController = new TextInputController() | ||||
| 
 | ||||
|   aboutToAppear() { | ||||
|     // this.ratio = globalThis.ratio | ||||
|     this.ratio = AppStorage.get<number>('ratio') || 0 | ||||
|     this.openFlag = true | ||||
|     const fileUtil = new FileUtils(this.context) | ||||
|     this.fileUtil = fileUtil | ||||
|     this.getVideoConfig() | ||||
|   } | ||||
| 
 | ||||
|   async getFileHandleCode(td: number): Promise<void> { | ||||
|     return new Promise(async (resolve, reject) => { | ||||
|       const record_handle = await startRecordVideo(this.param, td, this.context, 'lp') | ||||
|       // this.rocordHandleObj['rocord_handle'+td] = record_handle | ||||
|       Reflect.set(this.rocordHandleObj, 'rocord_handle' + td, record_handle); | ||||
|       resolve() | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   outClick() { | ||||
|     this.openFlag = false | ||||
|   } | ||||
| 
 | ||||
|   async onPageShow() { | ||||
|   } | ||||
| 
 | ||||
|   async getVideoConfig() { | ||||
|     const data = await this.fileUtil.readFile(GlobalConfig.commonFileWriteAddress + '/config/config3.txt'); | ||||
|     this.oldParam = JSON.parse(data) | ||||
|     this.param = JSON.parse(data) | ||||
|   } | ||||
| 
 | ||||
|   async writeConfig() { | ||||
|     this.oldParam = JSON.parse(JSON.stringify(this.param)) | ||||
|     this.videoArr = JSON.parse(JSON.stringify(this.videoArr)) | ||||
|     const folderPath = await this.fileUtil.initFolder(`/config`); | ||||
|     this.fileUtil.addFile(`${folderPath}/config3.txt`, JSON.stringify(this.param)) | ||||
|     this.showFlag = false | ||||
|   } | ||||
| 
 | ||||
|   build() { | ||||
|     Column() { | ||||
|       TopLogo({ outFlag: $outFlag }) | ||||
| @ -588,44 +627,4 @@ struct Index { | ||||
| 
 | ||||
|     }.backgroundColor('#1A1A1A').width('100%').height('100%') | ||||
|   } | ||||
| 
 | ||||
|   aboutToAppear() { | ||||
|     // this.ratio = globalThis.ratio | ||||
|     this.ratio = AppStorage.get<number>('ratio') || 0 | ||||
|     this.openFlag = true | ||||
|     const fileUtil = new FileUtils(this.context) | ||||
|     this.fileUtil = fileUtil | ||||
|     this.getVideoConfig() | ||||
|   } | ||||
| 
 | ||||
|   async getFileHandleCode(td: number): Promise<void> { | ||||
|     return new Promise(async (resolve, reject) => { | ||||
|       const record_handle = await startRecordVideo(this.param, td, this.context, 'lp') | ||||
|       // this.rocordHandleObj['rocord_handle'+td] = record_handle | ||||
|       Reflect.set(this.rocordHandleObj, 'rocord_handle' + td, record_handle); | ||||
|       resolve() | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   outClick() { | ||||
|     this.openFlag = false | ||||
|   } | ||||
| 
 | ||||
|   async onPageShow() { | ||||
|   } | ||||
| 
 | ||||
|   async getVideoConfig() { | ||||
|     const data = await this.fileUtil.readFile(GlobalConfig.commonFileWriteAddress + '/config/config3.txt'); | ||||
|     this.oldParam = JSON.parse(data) | ||||
|     this.param = JSON.parse(data) | ||||
|   } | ||||
| 
 | ||||
|   async writeConfig() { | ||||
|     this.oldParam = JSON.parse(JSON.stringify(this.param)) | ||||
|     this.videoArr = JSON.parse(JSON.stringify(this.videoArr)) | ||||
|     const folderPath = await this.fileUtil.initFolder(`/config`); | ||||
|     this.fileUtil.addFile(`${folderPath}/config3.txt`, JSON.stringify(this.param)) | ||||
|     this.showFlag = false | ||||
|   } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user