Compare commits
2 Commits
0aaf5ddd1a
...
46cc3a311f
| Author | SHA1 | Date | |
|---|---|---|---|
| 46cc3a311f | |||
| 6d86dad782 |
@ -25,7 +25,7 @@ CommonConstants {
|
||||
*/
|
||||
static readonly ACCOUNT_TABLE = {
|
||||
tableName: 'USER',
|
||||
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id INTEGER PRIMARY KEY AUTOINCREMENT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)',
|
||||
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id TEXT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)',
|
||||
columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','ksy1']
|
||||
};
|
||||
|
||||
|
||||
@ -261,9 +261,11 @@ export async function takePhotoFn(context) {
|
||||
if (param[key1]) {
|
||||
param.pztd = param[`td${Number(i) + 1}`]
|
||||
takePhoto(param, context, 'jt/', 0, (data) => {
|
||||
if(data.errorCode!=0){
|
||||
console.log('拍照失败')
|
||||
return
|
||||
}
|
||||
if (Number(data.fileSize) <= (Number(param.zdyz) * 1000)) {
|
||||
console.log('getPhtot0000')
|
||||
|
||||
map[key1] = true
|
||||
promptAction.showToast({
|
||||
message: `视频遮挡`,
|
||||
|
||||
@ -106,7 +106,8 @@ console.log('baoyihubaoyihu',video_uri,flag)
|
||||
// var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
|
||||
if(flag==0){
|
||||
rtsp_server.detectVideoSnapshotSize(video_uri,fileName,(err,snapResult)=>{
|
||||
console.log("baohaowen_detectLoop round end size1:"+snapResult.fileSize);
|
||||
console.log("baohaowen_detectLoop round end size1:"+JSON.stringify(snapResult));
|
||||
//errorCode=0为正常
|
||||
callback({fileSize:snapResult.fileSize,errorCode:snapResult.errorCode })
|
||||
});
|
||||
|
||||
@ -116,6 +117,7 @@ console.log('baoyihubaoyihu',video_uri,flag)
|
||||
return new Promise<takePhotoParam>((resolve,reject)=>{
|
||||
rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,true,(err,snapResult)=>{
|
||||
console.log('baoyihubaoyihu',video_uri,flag,JSON.stringify(snapResult))
|
||||
//errorCode=-2拍照失败
|
||||
console.log('getPhtot',JSON.stringify(snapResult))
|
||||
resolve({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize,errorCode:snapResult.errorCode })
|
||||
});
|
||||
|
||||
@ -14,6 +14,7 @@ export default struct Index {
|
||||
@State inputTextArr: string[] = ['', ''];
|
||||
@State imgArr1: Resource[] = [$r('app.media.1_nor'), $r('app.media.2_nor'), $r('app.media.3_nor'), $r('app.media.4_nor'), $r('app.media.5_nor'), $r('app.media.6_nor'), $r('app.media.7_nor'), $r('app.media.8_nor'), $r('app.media.9_nor'), $r('app.media.0_nor'), $r('app.media.x_nor'), $r('app.media.clear_nor'), $r('app.media.delete_nor'), $r('app.media.confirm_nor')]
|
||||
@State currentInputIndex: number = 0
|
||||
@State limit: boolean = false
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
private vocObj = null;
|
||||
private title = ''
|
||||
@ -79,7 +80,9 @@ export default struct Index {
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if(this.limit){
|
||||
return
|
||||
}
|
||||
const param = {
|
||||
carId: globalThis.carInfo.carId,
|
||||
examinationRoomId: globalThis.carInfo.examinationRoomId,
|
||||
@ -88,10 +91,13 @@ export default struct Index {
|
||||
}
|
||||
this.type='2'
|
||||
this.errorDialog.open()
|
||||
this.limit=true
|
||||
console.log('carInfo', JSON.stringify(globalThis.carInfo))
|
||||
examinerLoginService(param).then(res => {
|
||||
console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
|
||||
this.errorDialog.close()
|
||||
|
||||
this.limit=false
|
||||
if(res?.examinerLoginRsp?.head?.resultCode=='1'){
|
||||
// this.type='1'
|
||||
// this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage)
|
||||
|
||||
@ -462,13 +462,13 @@ struct UserInfo {
|
||||
await upDateTableByArray('USER', [])
|
||||
this.type='2'
|
||||
this.errorDialog.open()
|
||||
this.updateTimeLimit = true
|
||||
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
|
||||
getExaminationStudentInfo(param).then(async (res) => {
|
||||
this.errorDialog.close()
|
||||
setTimeout(() => {
|
||||
this.updateTimeLimit = true
|
||||
}, 30000)
|
||||
this.updateTimeLimit = false
|
||||
}, 3000)
|
||||
if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') {
|
||||
return
|
||||
}
|
||||
@ -517,6 +517,7 @@ struct UserInfo {
|
||||
}
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.updateTimeLimit = false
|
||||
console.log('error12error' + error)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user