Compare commits
No commits in common. "664a4a91c63cb48bd50399a24302d7d37798179f" and "a48ba68e5c697ae63b8c14c6154310b420a658be" have entirely different histories.
664a4a91c6
...
a48ba68e5c
BIN
entry/src/main.zip
Normal file
BIN
entry/src/main.zip
Normal file
Binary file not shown.
@ -196,7 +196,6 @@ struct Index {
|
||||
}
|
||||
|
||||
async heartMsg() {
|
||||
//心跳指令编号 //考试状态
|
||||
const arr = [globalThis.signNum || 0, globalThis.statue || 1]
|
||||
let tmpList = [];
|
||||
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
||||
@ -211,10 +210,10 @@ struct Index {
|
||||
|
||||
onPageShow() {
|
||||
this.loading = false
|
||||
this.createAlbum()
|
||||
this.userAuth();
|
||||
//plc
|
||||
getUDP()
|
||||
//中心udp
|
||||
getUDP2()
|
||||
clearInterval(this.interval)
|
||||
this.interval=setInterval(() => {
|
||||
@ -224,8 +223,10 @@ struct Index {
|
||||
}, 1000)
|
||||
// 3s拍照
|
||||
takePhotoFn(this.context)
|
||||
//tcp差分转发,如果差分通过udp转发可注释
|
||||
|
||||
//
|
||||
getTCP()
|
||||
// const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort)
|
||||
|
||||
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
||||
globalThis.singlePlay = false
|
||||
@ -235,10 +236,10 @@ struct Index {
|
||||
console.info('Index onPageShow');
|
||||
|
||||
}
|
||||
//创建截图文件夹
|
||||
|
||||
async createAlbum() {
|
||||
this.fileHelper = new FileHelper();
|
||||
// this.fileHelper.createAlbum('jt')
|
||||
this.fileHelper.createAlbum('jt')
|
||||
this.fileHelper.createAlbum('pz');
|
||||
|
||||
}
|
||||
@ -267,10 +268,7 @@ struct Index {
|
||||
}
|
||||
async initParams() {
|
||||
this.loading=false
|
||||
//获取设备信息
|
||||
this.createAlbum()
|
||||
await getDeviceInfo()
|
||||
//车辆信息
|
||||
getCarInfo()
|
||||
await setCurrentTime();
|
||||
this.carNum = globalThis.carInfo.plateNo;
|
||||
|
||||
@ -4,8 +4,8 @@ import ethernet from '@ohos.net.ethernet';
|
||||
import prompt from '@ohos.prompt'
|
||||
import { upDateTableByArray} from '../common/service/initable'
|
||||
import { getSyncData} from '../common/service/initable'
|
||||
// import { getUDP, getUDP2 } from '../common/utils/GlobleUdp';
|
||||
// import { getTCP } from '../common/utils/GlobleTcp';
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobleUdp';
|
||||
import { getTCP } from '../common/utils/GlobleTcp';
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@ -102,7 +102,9 @@ struct Index {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
getUDP(true)
|
||||
getUDP2(true)
|
||||
getTCP(true)
|
||||
})
|
||||
}
|
||||
.backgroundColor('#CCC4B8')
|
||||
|
||||
@ -62,16 +62,19 @@ struct UserInfo {
|
||||
@State faceCatchImg: string = ''
|
||||
|
||||
async onPageShow() {
|
||||
|
||||
//语音功能
|
||||
const systemParms:any = await getSyncData('MA_SYSTEMPARM')
|
||||
console.log('systemParms',systemParms.length)
|
||||
new WebRTCVoice(this.context);
|
||||
//初始化数据
|
||||
this.initData()
|
||||
//身份证读卡器初始化
|
||||
// this.openDeviceByIDCard()
|
||||
// 如果是单机模式则模拟假数据
|
||||
//获取sysset表数据
|
||||
|
||||
this.initSysset()
|
||||
//心跳处理
|
||||
// initJudgeUdp()
|
||||
this.heartMsg()
|
||||
|
||||
}
|
||||
@ -182,7 +185,6 @@ struct UserInfo {
|
||||
changeQkfn() {
|
||||
this.qkFn()
|
||||
}
|
||||
//初始化数据
|
||||
initData(){
|
||||
this.stepFlag = false
|
||||
this.faceCompareSucess = 0
|
||||
@ -212,18 +214,15 @@ struct UserInfo {
|
||||
if(val.id=='32'){
|
||||
globalThis.signNum=val.body[1]
|
||||
if(val.body[0]=='7'){
|
||||
//缺考处理
|
||||
this.getqkFn()
|
||||
this.signNum=val.body[1]
|
||||
}
|
||||
}else if(val.id=='42'){
|
||||
//收到中心缺考确认消息
|
||||
console.log('qkfnqkfn',val.body[0])
|
||||
this.qkFn()
|
||||
}
|
||||
})
|
||||
}
|
||||
//考点端查询缺考指令内容消息请求
|
||||
getqkFn() {
|
||||
let tmpList = [];
|
||||
tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0])
|
||||
@ -237,6 +236,11 @@ struct UserInfo {
|
||||
globalThis.udpClient2.sendMsg(param, this.context)
|
||||
}
|
||||
|
||||
facePass() {
|
||||
if (!this.stepFlag) {
|
||||
this.sfbdinterfaceFn()
|
||||
}
|
||||
}
|
||||
|
||||
async initSysset() {
|
||||
const that = this;
|
||||
@ -283,11 +287,10 @@ struct UserInfo {
|
||||
})
|
||||
})
|
||||
}
|
||||
//人脸比对窗口关闭
|
||||
|
||||
changeFaceCompareSuccess() {
|
||||
console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser))
|
||||
if (this.faceCompareSucess > 0) {
|
||||
//人脸比对通过
|
||||
this.sfbdinterfaceFn()
|
||||
}
|
||||
}
|
||||
@ -307,7 +310,7 @@ struct UserInfo {
|
||||
this.pageIndex--;
|
||||
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||
}
|
||||
//获取下载考生
|
||||
|
||||
getExaminationStudentInfoFn() {
|
||||
if (globalThis.singlePlay) {
|
||||
return
|
||||
@ -360,7 +363,6 @@ struct UserInfo {
|
||||
console.log('error12error' + error)
|
||||
})
|
||||
}
|
||||
//缺考
|
||||
qkFn() {
|
||||
this.faceCompareSucess = 0
|
||||
if (globalThis.singlePlay) {
|
||||
@ -397,7 +399,6 @@ struct UserInfo {
|
||||
})
|
||||
|
||||
}
|
||||
// 获取考试项目
|
||||
async getExaminationItemFn(){
|
||||
console.info('surenjun', this.currentUser.lsh)
|
||||
if(!this.currentUser.lsh||globalThis.singlePlay){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user