Compare commits

..

No commits in common. "dev" and "云南发布" have entirely different histories.

13 changed files with 56 additions and 201 deletions

View File

@ -4,13 +4,13 @@
{ {
"name": "default", "name": "default",
"material": { "material": {
"certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", "certpath": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject_two_git_com.oh.dts.cer",
"storePassword": "0000001BAC2A2242CBD30042192466419A8087398301FC1759A9BBCFD659DD68D4D6AC1F21A3C57322816D", "storePassword": "0000001B6A24D25D8FE60B28F302A471AE62F85272A82295ABB715D5DAA874E56338B643E7ED6CCF706BEC",
"keyAlias": "debugKey", "keyAlias": "debugKey",
"keyPassword": "0000001B6BC513F0EF12E88D402A699731288AA9D23B4A26CCDD08F4A6CBC6FDDBBCCEFBB2C5AFE4D3E3E8", "keyPassword": "0000001B6C2C6D7BE6CBC29BC9D356DDBF0C5D88D3BA97E0994DD5C78409CAA52639698A9374E235B64DAA",
"profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", "profile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject_two_git_com.oh.dts.p7b",
"signAlg": "SHA256withECDSA", "signAlg": "SHA256withECDSA",
"storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" "storeFile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject_two_git_com.oh.dts.p12"
} }
} }
], ],

View File

@ -1,15 +1,13 @@
{ {
"lockfileVersion": 2, "lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": { "specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
}, },
"packages": { "packages": {
"@ohos/hypium@1.0.6": { "@ohos/hypium@1.0.6": {
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
"registryType": "ohpm",
"shasum": "3f5fed65372633233264b3447705b0831dfe7ea1"
} }
} }
} }

View File

@ -309,7 +309,6 @@ export async function getDoubleCeneterTable(param) {
return return
} }
} }
getChuankouFn()
reslove(true) reslove(true)
router.pushUrl({ router.pushUrl({
url: 'pages/ExaminerLogin', url: 'pages/ExaminerLogin',
@ -324,7 +323,6 @@ export async function getSingleCenterTable(param) {
console.log('teststet0') console.log('teststet0')
upDataZhongxinginitialization(param).then((result) => { upDataZhongxinginitialization(param).then((result) => {
if (result === true) { if (result === true) {
getChuankouFn()
resolve(true) resolve(true)
} else { } else {
console.log('联网更新失败,请检查网络后重新更新') console.log('联网更新失败,请检查网络后重新更新')
@ -446,7 +444,6 @@ function openChuankouFn(callback) {
if(carInfo.kscx == 'C1'){ if(carInfo.kscx == 'C1'){
testNapi.SerialOpenAsync(devPath, (fd) => { testNapi.SerialOpenAsync(devPath, (fd) => {
globalThis.fd = fd; globalThis.fd = fd;
globalThis.ChounkouInit = true;
globalThis.num = 0 globalThis.num = 0
let parity = 0x4e; // 'N' let parity = 0x4e; // 'N'
let ret = testNapi.SerialSetAsync(globalThis.fd, 115200, 0, 8, 1, parity, (ret) => { let ret = testNapi.SerialSetAsync(globalThis.fd, 115200, 0, 8, 1, parity, (ret) => {

View File

@ -218,8 +218,7 @@ export async function takePhoto(param, context, dir, flag = 1, callback?) {
// @ts-ignore // @ts-ignore
// var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir); // var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
if (flag == 0) { if (flag == 0) {
// @ts-ignore rtsp_server.detectVideoSnapshotSize(video_uri, fileName, (err, snapResult) => {
rtsp_server.detectVideoSnapshotSize(video_uri, fileName, false,(err, snapResult) => {
console.log("baohaowen_detectLoop round end size1:" + snapResult.fileSize); console.log("baohaowen_detectLoop round end size1:" + snapResult.fileSize);
callback({ fileSize: snapResult.fileSize, errorCode: snapResult.errorCode }) callback({ fileSize: snapResult.fileSize, errorCode: snapResult.errorCode })
}); });

View File

@ -1,63 +0,0 @@
import dataPreferences from '@ohos.data.preferences';
let context = getContext(this);
let preference: dataPreferences.Preferences;
const SYSTEM_DB: string = 'system.db' //其他信息
const USER_DB: string = 'user.db' //用户信息
class PreferenceUtils {
// 写入其他缓存数据
async writeOtherData(value: dataPreferences.ValueType, key: string) {
// if (value === null) {
// return;
// }
if (!preference) {
await this.getPreferencesFromStorage(SYSTEM_DB);
}
try {
await preference.put(key, value);
} catch (err) {
console.info(`Failed to put value, Cause: ${err}`);
}
await preference.flush();
}
// 获取其他缓存数据
async getOtherModel<T extends dataPreferences.ValueType>(key: string) {
let value: dataPreferences.ValueType = 1;
if (!preference) {
await this.getPreferencesFromStorage(SYSTEM_DB);
}
try {
value = (await preference.get(key, ''));
} catch (err) {
console.info(`Failed to get value, Cause: ${err}`);
}
if (value === '') {
return;
}
return value as T;
}
// 删除登录数据
async deletePreferences() {
try {
await dataPreferences.deletePreferences(context, USER_DB);
} catch (err) {
console.info(`Failed to delete preferences, Cause: ${err}`);
}
;
}
// 创建登录数据preference
async getPreferencesFromStorage(name: string) {
try {
preference = await dataPreferences.getPreferences(context, name);
} catch (err) {
console.info(`Failed to get preferences, Cause: ${err}`);
}
}
}
export default new PreferenceUtils();

View File

@ -380,7 +380,7 @@ export default class UdpClientByCenter {
} }
// console.info('surenjun2','set message_1Fn=>' + newArr.toString()) // console.info('surenjun2','set message_1Fn=>' + newArr.toString())
callback && callback(newArr.toString()) callback && callback(newArr.toString())
// console.info('surenjun 左方向灯=>', newArr.toString()) console.info('surenjun 左方向灯=>', newArr.toString())
this.currentValue = newArr.toString(); this.currentValue = newArr.toString();
} else { } else {
callback && callback('') callback && callback('')

View File

@ -10,15 +10,9 @@ import { GlobalConfig } from '../config/global'
import { tcpUtil } from '../common/utils/TcpRequest'; import { tcpUtil } from '../common/utils/TcpRequest';
import DB from '../common/database/DbSql'; import DB from '../common/database/DbSql';
import { initTable } from '../common/service/initable'; import { initTable } from '../common/service/initable';
import appRecovery from '@ohos.app.ability.appRecovery';
export default class EntryAbility extends UIAbility { export default class EntryAbility extends UIAbility {
async onCreate(want, launchParam) { async onCreate(want, launchParam) {
appRecovery.enableAppRecovery(
appRecovery.RestartFlag.ALWAYS_RESTART,
appRecovery.SaveOccasionFlag.SAVE_WHEN_ERROR,
appRecovery.SaveModeFlag.SAVE_WITH_FILE
);
try { try {
console.log("sql first") console.log("sql first")
await DB.init(this.context) await DB.init(this.context)
@ -29,7 +23,6 @@ export default class EntryAbility extends UIAbility {
console.error('sql first error', e) console.error('sql first error', e)
} }
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
} }

View File

@ -21,9 +21,6 @@ import imageBtn from './compontents/imageBtn';
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
import {updateModelAndCar} from '../common/autoUpdate/index' import {updateModelAndCar} from '../common/autoUpdate/index'
import { UsbUtils } from '../common/utils/UsbUtils' import { UsbUtils } from '../common/utils/UsbUtils'
import appRecovery from '@ohos.app.ability.appRecovery';
import PreferenceUtils from '../common/utils/PreferenceUtils';
import CozyMsgDialog from './compontents/CozyDialog';
@Entry @Entry
@Component @Component
@ -380,7 +377,6 @@ struct Index {
} }
async aboutToAppear() { async aboutToAppear() {
// setInterval(() => { // setInterval(() => {
// let date = new Date(); // let date = new Date();
// console.info('jiangsong1:timeSynchronization begin '); // console.info('jiangsong1:timeSynchronization begin ');
@ -424,18 +420,7 @@ struct Index {
} }
}) })
}); });
const isRestart = await PreferenceUtils.getOtherModel("isRestart")
if (isRestart === "1") {
PreferenceUtils.writeOtherData("0", "isRestart")
setTimeout(() => {
router.pushUrl({
url: 'pages/UserInfo',
params: {
type: 1
}
}, router.RouterMode.Single);
}, 2000)
}
} }
aboutToDisappear() { aboutToDisappear() {

View File

@ -24,9 +24,6 @@ import errorMsgDialog from './compontents/errorMsgDialog';
import imageBtn from './compontents/imageBtn'; import imageBtn from './compontents/imageBtn';
import FileUtil from '../common/utils/File'; import FileUtil from '../common/utils/File';
import DB, { ColumnType } from '../common/database/DbSql'; import DB, { ColumnType } from '../common/database/DbSql';
import CozyMsgDialog from './compontents/CozyDialog';
import PreferenceUtils from '../common/utils/PreferenceUtils';
import appRecovery from '@ohos.app.ability.appRecovery';
@Entry @Entry
@Component @Component
@ -81,7 +78,6 @@ struct UserInfo {
@State faceFlag: string = '0'; @State faceFlag: string = '0';
@State FaceOpenStatue: string = '0'; //是否开启人脸识别 @State FaceOpenStatue: string = '0'; //是否开启人脸识别
@State faceCatchImg: string = '' @State faceCatchImg: string = ''
@State examCount: number = 0
@State systemParam: systemParam = { @State systemParam: systemParam = {
'Param341': true, //是否按顺序考试 'Param341': true, //是否按顺序考试
'Param803Str': '0', //开始考试前必须解开安全带或关车门 'Param803Str': '0', //开始考试前必须解开安全带或关车门
@ -189,10 +185,6 @@ struct UserInfo {
{ label: '考试员名', key: 'ksy2' }, { label: '考试员名', key: 'ksy2' },
] ]
private fileUtil: FileUtil private fileUtil: FileUtil
cozyDialog: CustomDialogController = new CustomDialogController({
builder: CozyMsgDialog(),
autoCancel: false
})
aboutToAppear() { aboutToAppear() {
this.fileUtil = new FileUtil(this.context) this.fileUtil = new FileUtil(this.context)
@ -200,15 +192,6 @@ struct UserInfo {
} }
async onPageShow() { async onPageShow() {
if (this.examCount > 5) {
PreferenceUtils.writeOtherData("1", "isRestart")
this.cozyDialog.open()
// 延迟关闭
setTimeout(() => {
this.cozyDialog.close()
appRecovery.restartApp()
}, 3000)
}
this.isExamStart = false this.isExamStart = false
this.startExam = false this.startExam = false
this.updateTimeLimit = false this.updateTimeLimit = false
@ -1343,21 +1326,6 @@ struct UserInfo {
} else { } else {
// Image($r('app.media.ksks_btn')) // Image($r('app.media.ksks_btn'))
// .commStyle() // .commStyle()
// Button(){
// Text("add")
// }.width(100).height(30).onClick(()=>{
// this.examCount++
// if (this.examCount > 2) {
// PreferenceUtils.writeOtherData("1", "isRestart")
// this.cozyDialog.open()
// // 延迟关闭
// setTimeout(() => {
// this.cozyDialog.close()
// appRecovery.restartApp()
// }, 3000)
// }
//
// })
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') }) imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') })
.margin({ bottom: 12 * this.ratio }) .margin({ bottom: 12 * this.ratio })
.onClick(async () => { .onClick(async () => {
@ -1370,8 +1338,7 @@ struct UserInfo {
this.errorDialog.open() this.errorDialog.open()
return return
} }
this.examCount++
console.log("已经考了", this.examCount + "个学员")
await this.prePareExam() await this.prePareExam()
}) })
} }

View File

@ -1,18 +0,0 @@
@CustomDialog
export default struct CozyMsgDialog {
private controller?: CustomDialogController
build() {
Column() {
Column() {
Text("温馨提示").fontSize(50)
Row() {
Text("设备已经进行过6次考试,马上进入内存以及数据优化过,请稍等片刻,请勿对机器进行操作,感谢配合!")
.fontSize(30).lineHeight(40)
}.width("100%").margin({
top: 20
}).padding(20)
}
}.width("100%").height(300).padding(20)
}
}

View File

@ -187,8 +187,8 @@ export default struct FaceCompare {
this.base64 = this.imageBase64 + data.base64 this.base64 = this.imageBase64 + data.base64
faceCompare({ faceCompare({
sfzh: this.sfzh, sfzh: this.sfzh,
secondImage:data.base64, secondImage: this.firstImage.substr(22),
firstImage: this.firstImage.substr(22), firstImage: data.base64,
type: 2, type: 2,
verifyType: 1 verifyType: 1
}) })

View File

@ -5,7 +5,6 @@
"type": "entry", "type": "entry",
"description": "$string:module_desc", "description": "$string:module_desc",
"mainElement": "EntryAbility", "mainElement": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"deviceTypes": [ "deviceTypes": [
"default", "default",
"tablet", "tablet",
@ -16,13 +15,13 @@
"abilities": [ "abilities": [
{ {
"name": "EntryAbility", "name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts", "srcEntrance": "./ets/entryability/EntryAbility.ts",
"description": "$string:EntryAbility_desc", "description": "$string:EntryAbility_desc",
"icon": "$media:logo_app", "icon": "$media:logo_app",
"label": "$string:EntryAbility_label", "label": "$string:EntryAbility_label",
"startWindowIcon": "$media:icon", "startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background", "startWindowBackground": "$color:start_window_background",
"exported": true, "visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [

View File

@ -1,15 +1,13 @@
{ {
"lockfileVersion": 2, "lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": { "specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
}, },
"packages": { "packages": {
"@ohos/hypium@1.0.6": { "@ohos/hypium@1.0.6": {
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
"registryType": "ohpm",
"shasum": "3f5fed65372633233264b3447705b0831dfe7ea1"
} }
} }
} }