Compare commits
	
		
			2 Commits
		
	
	
		
			main
			...
			new_sub_bo
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 5e0782725b | ||
|  | e2176a5532 | 
| @ -4,13 +4,13 @@ | ||||
|       { | ||||
|         "name": "default", | ||||
|         "material": { | ||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", | ||||
|           "storePassword": "0000001A411B16D84BA448A9AED56C5B7E351A55B8BA7BA0073A2313B214C24C5740A4B49E6E80AD05F0", | ||||
|           "certpath": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", | ||||
|           "storePassword": "0000001BBBEEEB230EFEEF9482B9CDE082C143FEA0EC8E8DCA87DF84471BEB463FAB79CCC9312E2A1C883F", | ||||
|           "keyAlias": "debugKey", | ||||
|           "keyPassword": "0000001AD6836BCC5536725F76279FB36A15D9F61E7CE88C2D043642297F81A9662DEB365314D756CB63", | ||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b", | ||||
|           "keyPassword": "0000001B994720ED634C0906F820EB6B2DBDE10AD110DF8123E58504AD50649E689A264D07736A5F5A872C", | ||||
|           "profile": "/Users/surenjun/.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" | ||||
|           "storeFile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12" | ||||
|         } | ||||
|       } | ||||
|     ], | ||||
|  | ||||
| @ -3,9 +3,7 @@ import promptAction from '@ohos.promptAction' | ||||
| import router from '@ohos.router' | ||||
| import { dateFormat } from '../utils/tools' | ||||
| import FileUtil from '../../common/utils/File' | ||||
| import AccountTable from '../../common/database/tables/AccountTable' | ||||
| import MA_SYSSET from '../../common/constants/MA_SYSSET' | ||||
| import { takePhoto,deleteAllFileByPiC } from '../../common/service/videoService' | ||||
| import { deleteAllFileByPiC, takePhoto } from '../../common/service/videoService' | ||||
| 
 | ||||
| import { | ||||
|   delSyncTable, | ||||
| @ -16,7 +14,8 @@ import { | ||||
| } from '../../common/service/initable' | ||||
| import { GlobalConfig } from '../../config/index' | ||||
| import testNapi from '@ohos.hiserialsdk' | ||||
| import fs from '@ohos.file.fs'; | ||||
| import fs from '@ohos.file.fs' | ||||
| 
 | ||||
| let num = 0 | ||||
| 
 | ||||
| export async function getliushuiNum(context) { | ||||
| @ -41,6 +40,7 @@ export async function getliushuiNum(context) { | ||||
|     // return str
 | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| export async function deleteAllFIleLog(path) { | ||||
|   let options = { | ||||
|     "recursion": false, | ||||
| @ -65,6 +65,7 @@ export async function deleteAllFIleLog(path){ | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| export async function delHilog() { | ||||
|   console.log('kkkkmmm1') | ||||
| 
 | ||||
| @ -87,6 +88,7 @@ export async function delHilog(){ | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function isSevenDaysAgo(date) { | ||||
|   const today = new Date(); // 当前日期
 | ||||
|   const target = new Date(date); // 需要判断的日期
 | ||||
| @ -97,6 +99,7 @@ function isSevenDaysAgo(date) { | ||||
|   // 如果差异天数正好是7,则原日期是当前日期的前七天
 | ||||
|   return diffDays > 7; | ||||
| } | ||||
| 
 | ||||
| //配置流水号
 | ||||
| export async function setliushuiNum(context) { | ||||
|   const fileUtil = new FileUtil(context) | ||||
| @ -323,7 +326,8 @@ export async function takePhotoFn(context) { | ||||
| } | ||||
| 
 | ||||
| let fd | ||||
| const devPath = "/dev/ttyS3" | ||||
| // 5 7
 | ||||
| const devPath = "/dev/ttyS5" | ||||
| 
 | ||||
| function openChuankouFn(callback) { | ||||
|   console.log('SerialOpen in indexservice, path=' + devPath) | ||||
| @ -338,6 +342,15 @@ function openChuankouFn(callback) { | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| function arrayToBuffer(arr: number[]): ArrayBuffer { | ||||
|   const buffer = new ArrayBuffer(arr.length); | ||||
|   const view = new DataView(buffer); | ||||
|   arr.forEach((value, index) => { | ||||
|     view.setUint8(index, value); | ||||
|   }); | ||||
|   return buffer; | ||||
| } | ||||
| 
 | ||||
| function getChuankouFnMsg() { | ||||
|   let timeout = 50000; // 2秒超时
 | ||||
|   let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
 | ||||
| @ -348,7 +361,21 @@ function getChuankouFnMsg() { | ||||
|     console.log('zzc 3 try receive msg') | ||||
|     testNapi.SerialRecvAsync(globalThis.fd, timeout, (revTestInfo) => { | ||||
|       console.log('zzc 4 received msg') | ||||
|       console.log('revTestInfo', revTestInfo.recevedBuf.length) | ||||
|       console.log('revTestInfo', JSON.stringify(revTestInfo)) | ||||
|       // TODO: 读取串口数据
 | ||||
|       // if (revTestInfo.recevedLen > 0) {
 | ||||
|       //   const buffer = this.arrayToBuffer(revTestInfo.recevedBuf);
 | ||||
|       //   console.log(buffer.toString(), 'wzj4')
 | ||||
|       //   let dataView = new DataView(buffer)
 | ||||
|       //   let str = ""
 | ||||
|       //   for (let i = 0; i < dataView?.byteLength; ++i) {
 | ||||
|       //     let c = String.fromCharCode(dataView?.getUint8(i))
 | ||||
|       //     if (c !== "\n") {
 | ||||
|       //       str += c
 | ||||
|       //     }
 | ||||
|       //   }
 | ||||
|       //   console.log(str, 'wzj4')
 | ||||
|       // }
 | ||||
| 
 | ||||
|       const message = revTestInfo?.recevedBuf?.toString() | ||||
|       console.log('chuankou', message) | ||||
|  | ||||
| @ -219,7 +219,7 @@ export default class UdpClientByCenter { | ||||
|   } | ||||
| 
 | ||||
|   sendMsgExt(param, context?) { | ||||
|     console.log('sendMsgExt enterbitbit',JSON.string(param)); | ||||
|     console.log('sendMsgExt enterbitbit',JSON.stringify(param)); | ||||
|     if (context) { | ||||
|       this.context = context | ||||
|     } | ||||
|  | ||||
| @ -76,8 +76,7 @@ export default struct Index { | ||||
|     console.log('mmmm', ret) | ||||
|     let revTestInfo = testNapi?.SerialRecv(this.fd, timeout); | ||||
| 
 | ||||
|     console.log('revTestInfo', revTestInfo.recevedBuf.length) | ||||
| 
 | ||||
|     if (revTestInfo.recevedBuf) { | ||||
|       const message = revTestInfo?.recevedBuf?.toString() | ||||
|       console.log('chuankou', this.index, message) | ||||
|       if (message == '') { | ||||
| @ -95,6 +94,8 @@ export default struct Index { | ||||
|       if (msg[9] == this.dwMap[this.index]) { | ||||
|         this.warnFlag[this.index] = '2' | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|  | ||||
| @ -77,7 +77,7 @@ struct UserInfo { | ||||
|   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 | ||||
|   @State faceCatchImg: string = '' | ||||
|   @State Param803Str: string = '' | ||||
|   @State Param341: boolean = '' | ||||
|   @State Param341: Boolean = false | ||||
|   private title = '' | ||||
|   private type = '2' | ||||
|   // 过程照片拍照 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user