Compare commits
No commits in common. "d743f22889bf17f8f7c44dfc3fa5a2d43837f7b0" and "4bc2a88b7c391f6e1f03b49cbc7c3df45989784b" have entirely different histories.
d743f22889
...
4bc2a88b7c
@ -3,12 +3,16 @@ import { obtainCarExamInfo } from '../../api/index'
|
||||
import { dateFormat } from '../utils/tools'
|
||||
import router from '@ohos.router'
|
||||
import promptAction from '@ohos.promptAction'
|
||||
import { getSyncData } from '../../common/service/initable'
|
||||
import { GlobalConfig } from '../../config/index'
|
||||
import FileUtil from '../../common/utils/File'
|
||||
|
||||
//获取设备信息
|
||||
export async function getDeviceInfo(context) {
|
||||
// globalThis.deviceNo = '153216400880'; //科目三设备
|
||||
// globalThis.deviceNo = '150667400235'; //科目三设备
|
||||
// globalThis.deviceNo = '1649018001275'; //洛阳科目三设备
|
||||
// globalThis.deviceNo = 'MAC-36E6575F'; //杭州科目二设备 489
|
||||
// globalThis.deviceNo = 'MAC-C57C8966'; //杭州科目二设备
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const fileUtil = new FileUtil(context)
|
||||
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/deviceNo.txt');
|
||||
@ -17,9 +21,12 @@ export async function getDeviceInfo(context) {
|
||||
message: `请先进行设备注册`,
|
||||
duration: 3000
|
||||
});
|
||||
router.pushUrl({
|
||||
url: 'pages/Register',
|
||||
}, router.RouterMode.Single);
|
||||
resolve('')
|
||||
} else {
|
||||
const fileData=JSON.parse(data)
|
||||
const fileData = JSON.parse(data)
|
||||
globalThis.deviceNo = fileData.deviceName
|
||||
getCarInfo()
|
||||
resolve(fileData.deviceName)
|
||||
|
||||
@ -181,7 +181,6 @@ export default class TcpClient {
|
||||
let promise = this.tcp.close();
|
||||
promise.then(() => {
|
||||
globalThis.getCloseTcp = true
|
||||
|
||||
console.log(TAG, 'tcpCloseSuccess')
|
||||
callback()
|
||||
reslove(true)
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
import socket from '@ohos.net.socket';
|
||||
import { Array2Byte } from '../utils/tools'
|
||||
import {getChuankouFn} from '../../common/service/indexService'
|
||||
import {getUDP} from './GlobalUdp'
|
||||
|
||||
const TAG = 'socketTag[PLC.UdpClient]'
|
||||
import prompt from '@ohos.prompt'
|
||||
|
||||
@ -29,7 +29,7 @@ export default class UdpClient {
|
||||
private oppositeIpPort: string = ''
|
||||
|
||||
private udp: any = null
|
||||
// private stashFn:StashFuncotionon
|
||||
// private stashFn:StashFuncotion
|
||||
|
||||
constructor(udplocalIp: string, udplocalIpPort: string, udpOppositeIp: string, udpOppositeIpPort: string) {
|
||||
this.localIp = udplocalIp
|
||||
@ -179,10 +179,9 @@ export default class UdpClient {
|
||||
num++
|
||||
console.log(TAG,'plc udp信号丢失')
|
||||
if(num==3){
|
||||
getUDP(globalThis.context,true)
|
||||
// await this.bindUdp()
|
||||
// await this.sendMsg('111')
|
||||
// await this.onMessage(callback)
|
||||
await this.bindUdp()
|
||||
await this.sendMsg('111')
|
||||
await this.onMessage(callback)
|
||||
num=0
|
||||
}
|
||||
prompt.showToast({
|
||||
|
||||
@ -30,8 +30,6 @@ export default class EntryAbility extends UIAbility {
|
||||
globalThis.hasAuth = false
|
||||
globalThis.version = '2022.08.13.01'
|
||||
globalThis.judgeVersion = '2022.12.05.1'
|
||||
// globalThis.version = '2024.11.22.14'
|
||||
// globalThis.judgeVersion = '2024.11.22.14'
|
||||
globalThis.videoVersion= '1.0'
|
||||
// globalThis.version = '2023.12.13.01'
|
||||
// globalThis.judgeVersion = '2023.09.30.1'
|
||||
|
||||
@ -311,7 +311,6 @@ struct Index {
|
||||
carNo: globalThis.carInfo.carNo,
|
||||
placeId: globalThis.carInfo.examinationRoomId
|
||||
}
|
||||
console.log('paramparam',JSON.stringify(param))
|
||||
// globalThis.udpClient2.initHeartSendMsg(param,this.context)
|
||||
if (globalThis.udpClient2.getStatus()) {
|
||||
globalThis.udpClient2.sendMsgExt(param, this.context)
|
||||
@ -334,7 +333,8 @@ struct Index {
|
||||
this.loading = false
|
||||
this.userAuth();
|
||||
this.createAlbum()
|
||||
|
||||
await getUDP(this.context,false)
|
||||
await getUDP2(this.context,false)
|
||||
this.num=0
|
||||
clearInterval(this.interval)
|
||||
this.interval = setInterval(() => {
|
||||
@ -347,6 +347,7 @@ struct Index {
|
||||
}, 1000)
|
||||
|
||||
//
|
||||
getTCP()
|
||||
// const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort)
|
||||
|
||||
console.info('Index onPageShow');
|
||||
@ -387,12 +388,8 @@ struct Index {
|
||||
async initParams() {
|
||||
this.loading = false
|
||||
takePhotoFn(this.context)
|
||||
await getDeviceInfo(this.context)
|
||||
this.deviceId=await getDeviceInfo(this.context) || ''
|
||||
await getCarInfo()
|
||||
await getUDP(this.context,false)
|
||||
await getUDP2(this.context,false)
|
||||
getTCP()
|
||||
this.deviceId= globalThis.carInfo.carNo
|
||||
await setCurrentTime();
|
||||
this.carNum = globalThis.carInfo.plateNo;
|
||||
this.version = globalThis.version;
|
||||
|
||||
@ -55,7 +55,7 @@ export default struct Index {
|
||||
}
|
||||
.margin({ left: 24 * this.ratio })
|
||||
|
||||
Text('考车号:' + globalThis.carInfo.carNo)
|
||||
Text('考车号:' + globalThis.deviceNo)
|
||||
.fontColor('#CCAE7A')
|
||||
.fontSize(22 * this.ratio)
|
||||
.margin({ right: 24 * this.ratio })
|
||||
|
||||
@ -316,6 +316,7 @@ struct UserInfo {
|
||||
|
||||
const faceParam = syssetParams.filter(sys => sys.v_no == '2413')
|
||||
|
||||
// that.FaceOpenStatue = '0'
|
||||
// faceParam?.[0]?.v_value ||
|
||||
// 1身份证读卡器 2指纹 3人脸
|
||||
if(openCheckFlag=='1'){
|
||||
@ -325,7 +326,6 @@ struct UserInfo {
|
||||
that.openDeviceByIDCard()
|
||||
}
|
||||
}
|
||||
// that.FaceOpenStatue = '0'
|
||||
|
||||
//0不自动更新 1自动更新(不限次数) 2没有考生更新2次
|
||||
if (that.studentRefreshStatue == '2') {
|
||||
|
||||
@ -217,7 +217,7 @@ struct Index {
|
||||
this.param.faceFlag = value
|
||||
console.info('Checkbox1 change is' + value)
|
||||
})
|
||||
Text('启用人脸比对').fontColor('#333333').fontSize(16 * this.ratio)
|
||||
Text('启用过程人脸比对').fontColor('#333333').fontSize(16 * this.ratio)
|
||||
TextInput({ text: this.param.rlls, controller: this.inputController })
|
||||
.type(InputType.Normal)
|
||||
.borderRadius(0)
|
||||
@ -229,7 +229,7 @@ struct Index {
|
||||
.onChange((value) => {
|
||||
this.param.rlls = value
|
||||
})
|
||||
Text('过程拍照通道').fontColor('#333333').fontSize(16 * this.ratio)
|
||||
Text('拍照通道').fontColor('#333333').fontSize(16 * this.ratio)
|
||||
TextInput({ text: this.param.pztd, controller: this.inputController })
|
||||
.type(InputType.Normal)
|
||||
.borderRadius(0)
|
||||
|
||||
@ -178,7 +178,7 @@ export default struct FaceCompare {
|
||||
|
||||
async faceComparFn() {
|
||||
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
|
||||
console.log('mmmmt',this.base64)
|
||||
@ -191,6 +191,7 @@ export default struct FaceCompare {
|
||||
})
|
||||
.then(res => {
|
||||
console.log('mmmmm8', res)
|
||||
|
||||
if (res) {
|
||||
this.controller.stop()
|
||||
this.showFaceCompare = !this.showFaceCompare
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user