Compare commits
2 Commits
bf0e77bf1f
...
9337adc8cc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9337adc8cc | |||
| 71e51f4e7d |
@ -132,10 +132,10 @@ export class FileHelper {
|
|||||||
var all_fileAsset = await photoFetchResult.getAllObjects();
|
var all_fileAsset = await photoFetchResult.getAllObjects();
|
||||||
|
|
||||||
var uri_array=[]
|
var uri_array=[]
|
||||||
console.log( 'baoyihu deletePictureOfAlbum iterator begin' );
|
console.log( 'baoyihu deletePictureOfAlbum iterator begin',album_Name );
|
||||||
for (let onfile of all_fileAsset)
|
for (let onfile of all_fileAsset)
|
||||||
{
|
{
|
||||||
console.log( 'baoyihu deletePictureOfAlbum uri : ' + onfile.uri +', photoType : '+onfile.photoType+', displayName : '+onfile.displayName);
|
console.log(album_Name, 'baoyihu deletePictureOfAlbum uri : ' + onfile.uri +', photoType : '+onfile.photoType+', displayName : '+onfile.displayName);
|
||||||
uri_array.push(onfile.uri);
|
uri_array.push(onfile.uri);
|
||||||
}
|
}
|
||||||
await this.userFileMgr.deleteAssets(uri_array);
|
await this.userFileMgr.deleteAssets(uri_array);
|
||||||
@ -146,21 +146,21 @@ export class FileHelper {
|
|||||||
|
|
||||||
let trashAlbum = await albumFetchResult.getFirstObject();
|
let trashAlbum = await albumFetchResult.getFirstObject();
|
||||||
trashAlbum.deleteAssets(all_fileAsset).then(() => {
|
trashAlbum.deleteAssets(all_fileAsset).then(() => {
|
||||||
console.log('baoyihu deletePictureOfAlbum trash ok : ');
|
console.log('baoyihu deletePictureOfAlbum trash ok : ',album_Name);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log('baoyihu deletePictureOfAlbum trash faild : ');
|
console.log('baoyihu deletePictureOfAlbum trash faild : ',album_Name);
|
||||||
});
|
});
|
||||||
}catch (err) {
|
}catch (err) {
|
||||||
console.log('baoyihu deletePictureOfAlbum error: '+err);
|
console.log('baoyihu deletePictureOfAlbum error: '+err,album_Name);
|
||||||
} finally {
|
} finally {
|
||||||
if (albumFetchResult != null) {
|
if (albumFetchResult != null) {
|
||||||
albumFetchResult.close();
|
albumFetchResult.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log( 'baoyihu deletePictureOfAlbum delete end' );
|
console.log( 'baoyihu deletePictureOfAlbum delete end',album_Name );
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log( 'baoyihu deletePictureOfAlbum failed with err: ' + err);
|
console.log( 'baoyihu deletePictureOfAlbum failed with err: ' + err,album_Name);
|
||||||
} finally {
|
} finally {
|
||||||
if (photoFetchResult != null) {
|
if (photoFetchResult != null) {
|
||||||
photoFetchResult.close();
|
photoFetchResult.close();
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import {
|
|||||||
import { GlobalConfig } from '../../config/index'
|
import { GlobalConfig } from '../../config/index'
|
||||||
import testNapi from '@ohos.hiserialsdk'
|
import testNapi from '@ohos.hiserialsdk'
|
||||||
import fs from '@ohos.file.fs';
|
import fs from '@ohos.file.fs';
|
||||||
|
import {deleteAllPicturesFn} from './videoService'
|
||||||
let num = 0
|
let num = 0
|
||||||
|
|
||||||
async function getliushuiNum(data) {
|
async function getliushuiNum(data) {
|
||||||
@ -94,7 +94,31 @@ export async function setVideoParam() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let fileFd
|
let fileFd
|
||||||
|
export async function delHilog(day=7) {
|
||||||
|
return new Promise(async (reslove)=>{
|
||||||
|
const fileUtil = new FileUtil(globalThis.context)
|
||||||
|
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/hilogTime.txt');
|
||||||
|
const folderPath = await fileUtil.initFolder(`/config`);
|
||||||
|
console.log('kkkkmmm2', data)
|
||||||
|
if (data === '' || data === undefined) {
|
||||||
|
const date = dateFormat(new Date()).split(' ')[0]
|
||||||
|
console.log('mm'.date)
|
||||||
|
fileUtil.addFile(`${folderPath}/hilogTime.txt`, date)
|
||||||
|
} else {
|
||||||
|
console.log('kkkkmmm2', data)
|
||||||
|
console.log('datadata', data, isSevenDaysAgo(data))
|
||||||
|
if (isSevenDaysAgo(data,day)) {
|
||||||
|
const date = dateFormat(new Date()).split(' ')[0]
|
||||||
|
fileUtil.addFile(`${folderPath}/hilogTime.txt`, date)
|
||||||
|
// deleteAllFileByPiC('pz', 1)
|
||||||
|
await deleteAllPicturesFn()
|
||||||
|
reslove(true)
|
||||||
|
// fileUtil.addFile(`${folderPath}/hilogTime.txt`, JSON.stringify(num))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
//配置流水号
|
//配置流水号
|
||||||
export async function setliushuiNum() {
|
export async function setliushuiNum() {
|
||||||
const data = AppStorage.get('liushuiNo')
|
const data = AppStorage.get('liushuiNo')
|
||||||
|
|||||||
@ -180,6 +180,7 @@ interface takePhotoParam {
|
|||||||
const fileHelper = new FileHelper();
|
const fileHelper = new FileHelper();
|
||||||
|
|
||||||
export async function delPic(day,type) {
|
export async function delPic(day,type) {
|
||||||
|
return new Promise(async reslove=>{
|
||||||
let phAccessHelper = photoAccessHelper.getPhotoAccessHelper(globalThis.context);
|
let phAccessHelper = photoAccessHelper.getPhotoAccessHelper(globalThis.context);
|
||||||
console.info('albumGetAssetsDemoCallback');
|
console.info('albumGetAssetsDemoCallback');
|
||||||
let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates();
|
let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates();
|
||||||
@ -195,11 +196,13 @@ export async function delPic(day,type) {
|
|||||||
let albums = await albumList.getAllObjects();
|
let albums = await albumList.getAllObjects();
|
||||||
for(let i=0;i<=albums.length;i++){
|
for(let i=0;i<=albums.length;i++){
|
||||||
let albumName=albums[i].albumName
|
let albumName=albums[i].albumName
|
||||||
console.log('albumNamealbumName',albumName)
|
if (isSevenDaysAgo(albumName, day) &&albumName!='jt'&&albumName!='pz') {
|
||||||
if (isSevenDaysAgo(albumName, day)&&albumName!='jt'&&albumName!='pz') {
|
await deleteAllFileByPiC(albumName, type)
|
||||||
deleteAllFileByPiC(albums.albumName, type)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
reslove(true)
|
||||||
|
})
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,9 +227,10 @@ export async function takePhoto(param, context, dir, flag = 1, callback?) {
|
|||||||
return new Promise<takePhotoParam>(async (resolve, reject) => {
|
return new Promise<takePhotoParam>(async (resolve, reject) => {
|
||||||
const time = await getCurrentTime()
|
const time = await getCurrentTime()
|
||||||
const date = time.split(' ')[0]
|
const date = time.split(' ')[0]
|
||||||
|
// let dirName=dir?dir:date
|
||||||
let dirName=dir?dir:date
|
let dirName=dir?dir:date
|
||||||
rtsp_server.getVideoSnapshot(context, video_uri, fileName,dirName, true,async (err, snapResult) => {
|
rtsp_server.getVideoSnapshot(context, video_uri, fileName,dirName, true,async (err, snapResult) => {
|
||||||
console.log('baoyihubaoyihu', video_uri, flag,fileName,dir, JSON.stringify(snapResult.fileSize))
|
console.log('baoyihubaoyihu', video_uri, flag,fileName,dirName, JSON.stringify(snapResult.fileSize))
|
||||||
console.log('getPhtot', JSON.stringify(snapResult))
|
console.log('getPhtot', JSON.stringify(snapResult))
|
||||||
if(snapResult.result&&snapResult.errorCode==0){
|
if(snapResult.result&&snapResult.errorCode==0){
|
||||||
resolve({
|
resolve({
|
||||||
@ -249,14 +253,15 @@ export async function takePhoto(param, context, dir, flag = 1, callback?) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
export async function deleteAllPicturesFn(){
|
export async function deleteAllPicturesFn(){
|
||||||
fileHelper.deleteAllPictures();
|
await fileHelper.deleteAllPictures();
|
||||||
deleteAllVideos(globalThis.context,photoAccessHelper.AlbumType.USER,photoAccessHelper.AlbumSubtype.VIDEO)
|
await deleteAllVideos(globalThis.context,photoAccessHelper.AlbumType.USER,photoAccessHelper.AlbumSubtype.VIDEO)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//type:1 是图片 2是视频
|
//type:1 是图片 2是视频
|
||||||
export async function deleteAllFileByPiC(dirName, type = 1) {
|
export async function deleteAllFileByPiC(dirName, type = 1) {
|
||||||
// const fileHelper = new FileHelper();
|
// const fileHelper = new FileHelper();
|
||||||
|
console.log('deleteFileOfAlbum',dirName,type)
|
||||||
fileHelper.deleteFileOfAlbum(dirName, type);
|
fileHelper.deleteFileOfAlbum(dirName, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import systemTime from '@ohos.systemDateTime';
|
import systemTime from '@ohos.systemDateTime';
|
||||||
import { expect } from '@ohos/hypium';
|
import { expect } from '@ohos/hypium';
|
||||||
import FileUtil from './File';
|
import FileUtil from './File';
|
||||||
export function isSevenDaysAgo(date,days?) {
|
export function isSevenDaysAgo(date,days=2) {
|
||||||
const today = new Date(); // 当前日期
|
const today = new Date(); // 当前日期
|
||||||
const target = new Date(date); // 需要判断的日期
|
const target = new Date(date); // 需要判断的日期
|
||||||
console.info("listFile succeed1",JSON.stringify(target));
|
console.info("listFile succeed1",JSON.stringify(target));
|
||||||
@ -11,8 +11,8 @@ export function isSevenDaysAgo(date,days?) {
|
|||||||
const diffDays = diff / (1000 * 60 * 60 * 24); // 将毫秒转换为天数
|
const diffDays = diff / (1000 * 60 * 60 * 24); // 将毫秒转换为天数
|
||||||
console.info("listFile succeed2",JSON.stringify(diffDays));
|
console.info("listFile succeed2",JSON.stringify(diffDays));
|
||||||
// 如果差异天数正好是2,则原日期是当前日期的前2天
|
// 如果差异天数正好是2,则原日期是当前日期的前2天
|
||||||
console.log('diffDays',diffDays)
|
console.log('diffDays',diffDays,days)
|
||||||
return diffDays > (Number(days) || 2);
|
return diffDays >= (Number(days) );
|
||||||
}
|
}
|
||||||
// export async function writeLog(path,param){
|
// export async function writeLog(path,param){
|
||||||
// return
|
// return
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
|
|||||||
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
||||||
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
||||||
import { getTCP } from '../common/utils/GlobalTcp';
|
import { getTCP } from '../common/utils/GlobalTcp';
|
||||||
import { setliushuiNum, takePhotoFn, setVideoParam } from '../common/service/indexService';
|
import { setliushuiNum, takePhotoFn, setVideoParam, delHilog } from '../common/service/indexService';
|
||||||
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
||||||
import worker, { MessageEvents } from '@ohos.worker';
|
import worker, { MessageEvents } from '@ohos.worker';
|
||||||
import promptAction from '@ohos.promptAction'
|
import promptAction from '@ohos.promptAction'
|
||||||
@ -22,6 +22,7 @@ import UdpEvent from '../common/utils/UdpEvent'
|
|||||||
import UIAbility from '@ohos.app.ability.UIAbility';
|
import UIAbility from '@ohos.app.ability.UIAbility';
|
||||||
import {
|
import {
|
||||||
deleteAllPicturesFn,
|
deleteAllPicturesFn,
|
||||||
|
delPic,
|
||||||
endRecordVideo, getUserAlbumItemByDisplayName, saveStartRecordVideo } from '../common/service/videoService';
|
endRecordVideo, getUserAlbumItemByDisplayName, saveStartRecordVideo } from '../common/service/videoService';
|
||||||
import imageBtn from './compontents/imageBtn'
|
import imageBtn from './compontents/imageBtn'
|
||||||
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
||||||
@ -45,6 +46,7 @@ struct Index {
|
|||||||
@State initParamFlag: boolean = false
|
@State initParamFlag: boolean = false
|
||||||
@State fd: number = -1;
|
@State fd: number = -1;
|
||||||
@State num: number = 0;
|
@State num: number = 0;
|
||||||
|
@State delLoading: boolean = true;
|
||||||
fileHelper = null;
|
fileHelper = null;
|
||||||
private fileUtil: FileUtil
|
private fileUtil: FileUtil
|
||||||
private interval = null;
|
private interval = null;
|
||||||
@ -297,6 +299,33 @@ struct Index {
|
|||||||
//
|
//
|
||||||
.borderRadius(19 * this.ratio * this.dialogRatio)
|
.borderRadius(19 * this.ratio * this.dialogRatio)
|
||||||
}
|
}
|
||||||
|
if(this.delLoading){
|
||||||
|
Column() {
|
||||||
|
Image($r('app.media.open_loading'))
|
||||||
|
.width(200 * globalThis.ratio)
|
||||||
|
.rotate({ angle: this.angle })
|
||||||
|
.height(200 * globalThis.ratio)
|
||||||
|
.animation({
|
||||||
|
duration: 5000, // 动画时长
|
||||||
|
curve: Curve.EaseOut, // 动画曲线
|
||||||
|
delay: 500, // 动画延迟
|
||||||
|
iterations: -1, // 播放次数
|
||||||
|
playMode: PlayMode.Normal, // 动画模式
|
||||||
|
})
|
||||||
|
.margin({ top: 30 * globalThis.ratio })
|
||||||
|
|
||||||
|
Text('正在清理本地资源文件,请稍候……')
|
||||||
|
.fontSize(24 * globalThis.ratio)
|
||||||
|
.margin({ top: 20 * globalThis.ratio })
|
||||||
|
.fontWeight(400)
|
||||||
|
}
|
||||||
|
.visibility(this.loading ? Visibility.Visible : Visibility.Hidden)
|
||||||
|
.width(660 * globalThis.ratio)
|
||||||
|
.height(360 * globalThis.ratio)
|
||||||
|
.position({ x: 150 * globalThis.ratio, y: 98 * globalThis.ratio })
|
||||||
|
.backgroundColor('#E6E3DF')
|
||||||
|
.borderRadius(19 * globalThis.ratio)
|
||||||
|
}
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
Column() {
|
Column() {
|
||||||
Image($r('app.media.open_loading'))
|
Image($r('app.media.open_loading'))
|
||||||
@ -347,6 +376,7 @@ struct Index {
|
|||||||
globalThis.lsh = '1111111111111'
|
globalThis.lsh = '1111111111111'
|
||||||
globalThis.errorDialog = this.errorDialog
|
globalThis.errorDialog = this.errorDialog
|
||||||
globalThis.udpEvent = new UdpEvent();
|
globalThis.udpEvent = new UdpEvent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aboutToDisappear() {
|
aboutToDisappear() {
|
||||||
@ -381,7 +411,6 @@ struct Index {
|
|||||||
console.log("baoyihu after postMessage :", JSON.stringify(e.data));
|
console.log("baoyihu after postMessage :", JSON.stringify(e.data));
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let workData: WorkData = e.data;
|
let workData: WorkData = e.data;
|
||||||
this.loading = false
|
|
||||||
if (workData.isComplete) {
|
if (workData.isComplete) {
|
||||||
if(globalThis.singlePlay){
|
if(globalThis.singlePlay){
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
@ -389,7 +418,7 @@ struct Index {
|
|||||||
}, router.RouterMode.Single)
|
}, router.RouterMode.Single)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
getSyncData('MA_SYSSET').then(data => {
|
getSyncData('MA_SYSSET').then(async(data) => {
|
||||||
console.log('datadata', JSON.stringify(data))
|
console.log('datadata', JSON.stringify(data))
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
data.forEach(sys => {
|
data.forEach(sys => {
|
||||||
@ -397,6 +426,10 @@ struct Index {
|
|||||||
if(sys.v_no === '854'){
|
if(sys.v_no === '854'){
|
||||||
globalThis.param854Str=sys.v_value
|
globalThis.param854Str=sys.v_value
|
||||||
}
|
}
|
||||||
|
if(sys.v_no === '305'){
|
||||||
|
delPic(Number(sys.v_value),1)
|
||||||
|
delPic(Number(sys.v_value),2)
|
||||||
|
}
|
||||||
if (sys.v_no === '824'&&decodeURIComponent(sys.v_value)=='0') {
|
if (sys.v_no === '824'&&decodeURIComponent(sys.v_value)=='0') {
|
||||||
// this.Param612Str= decodeURIComponent(sys.v_value)
|
// this.Param612Str= decodeURIComponent(sys.v_value)
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
@ -411,6 +444,8 @@ struct Index {
|
|||||||
}, router.RouterMode.Single)
|
}, router.RouterMode.Single)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.loading = false
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -444,7 +479,6 @@ struct Index {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
console.log('ttttt', 1111)
|
|
||||||
await this.userAuth();
|
await this.userAuth();
|
||||||
let resourceManager = this.context.resourceManager;
|
let resourceManager = this.context.resourceManager;
|
||||||
|
|
||||||
@ -454,6 +488,7 @@ struct Index {
|
|||||||
console.log('globalThis.singlePlay', globalThis.singlePlay)
|
console.log('globalThis.singlePlay', globalThis.singlePlay)
|
||||||
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
||||||
// setVideoParam()
|
// setVideoParam()
|
||||||
|
|
||||||
console.log('diyidiy')
|
console.log('diyidiy')
|
||||||
this.context.resourceManager.getRawFileContent("welcome.wav").then(value => {
|
this.context.resourceManager.getRawFileContent("welcome.wav").then(value => {
|
||||||
this.avPlayer.playAudio(['welcome.wav'])
|
this.avPlayer.playAudio(['welcome.wav'])
|
||||||
@ -551,7 +586,9 @@ struct Index {
|
|||||||
this.heartMsg()
|
this.heartMsg()
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
//
|
||||||
this.createAlbum()
|
this.createAlbum()
|
||||||
|
|
||||||
//下载模型
|
//下载模型
|
||||||
// await this.getModel()
|
// await this.getModel()
|
||||||
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
||||||
|
|||||||
@ -138,6 +138,7 @@ struct UserInfo {
|
|||||||
this.avPlayer = new VoiceAnnounce();
|
this.avPlayer = new VoiceAnnounce();
|
||||||
}
|
}
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
|
this.isExamStart = false
|
||||||
this.startExam=false
|
this.startExam=false
|
||||||
this.updateTimeLimit = false
|
this.updateTimeLimit = false
|
||||||
this.ksksLimit = false
|
this.ksksLimit = false
|
||||||
@ -216,8 +217,6 @@ struct UserInfo {
|
|||||||
// // @ts-ignore
|
// // @ts-ignore
|
||||||
// this.currentUser=user
|
// this.currentUser=user
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.isExamStart = false
|
|
||||||
this.sczbkf = [];
|
this.sczbkf = [];
|
||||||
initJudgeUdp()
|
initJudgeUdp()
|
||||||
|
|
||||||
@ -255,15 +254,19 @@ struct UserInfo {
|
|||||||
async getCurrentStudent(id) {
|
async getCurrentStudent(id) {
|
||||||
let flag = false
|
let flag = false
|
||||||
// this.pageIndex
|
// this.pageIndex
|
||||||
|
console.log('currentidid',id)
|
||||||
this.list.map((res, index) => {
|
this.list.map((res, index) => {
|
||||||
|
console.log('tttt',res.sfzmhm,res.xm)
|
||||||
if (res.sfzmhm == id) {
|
if (res.sfzmhm == id) {
|
||||||
flag = true
|
flag = true
|
||||||
|
this.currentUser=EmptyCandidateObject
|
||||||
|
setTimeout(()=>{
|
||||||
this.currentUser = res
|
this.currentUser = res
|
||||||
this.currentUser.ksy2= globalThis.kgxm
|
this.currentUser.ksy2= globalThis.kgxm
|
||||||
|
},200)
|
||||||
|
|
||||||
this.lsh = this.currentUser.lsh
|
globalThis.lsh = res.lsh
|
||||||
globalThis.lsh = this.currentUser.lsh
|
globalThis.ksyh = res.ksy1sfzmhm
|
||||||
globalThis.ksyh = this.currentUser.ksy1sfzmhm
|
|
||||||
const {examSubject} = globalThis.carInfo;
|
const {examSubject} = globalThis.carInfo;
|
||||||
// this.currentUser.kszp=this.photo+res.kszp
|
// this.currentUser.kszp=this.photo+res.kszp
|
||||||
// this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp
|
// this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp
|
||||||
@ -497,10 +500,10 @@ struct UserInfo {
|
|||||||
if(!Number(this.systemParam.Param305Str)){
|
if(!Number(this.systemParam.Param305Str)){
|
||||||
that.systemParam.Param305Str='2'
|
that.systemParam.Param305Str='2'
|
||||||
}
|
}
|
||||||
console.log('Param305Str',that.systemParam.Param305Str)
|
// console.log('Param305Str',that.systemParam.Param305Str)
|
||||||
// delHilog(this.Param305Str)
|
// delHilog(this.Param305Str)
|
||||||
delPic(that.systemParam.Param305Str,1)
|
// delPic(that.systemParam.Param305Str,1)
|
||||||
delPic(that.systemParam.Param305Str,2)
|
// delPic(that.systemParam.Param305Str,2)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -635,18 +638,22 @@ struct UserInfo {
|
|||||||
dataList = this.list.length > 4 ? this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) : this.list;
|
dataList = this.list.length > 4 ? this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) : this.list;
|
||||||
|
|
||||||
this.dataList = dataList
|
this.dataList = dataList
|
||||||
|
const flag=dataList.filter((res)=>{
|
||||||
|
return res.sfzmhm==this.currentUser.sfzmhm
|
||||||
|
}).length?true:false
|
||||||
|
if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){
|
||||||
if (this.dataList.length) {
|
if (this.dataList.length) {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.currentUser = this.dataList[0]
|
this.currentUser = this.dataList[0]
|
||||||
this.currentUser.ksy2= globalThis.kgxm
|
this.currentUser.ksy2= globalThis.kgxm
|
||||||
globalThis.lsh=this.currentUser.lsh
|
globalThis.lsh=this.currentUser.lsh
|
||||||
},200)
|
},200)
|
||||||
// this.currentUser = this.dataList[0]
|
|
||||||
console.log('this.currentUser1',JSON.stringify(this.currentUser))
|
console.log('this.currentUser1',JSON.stringify(this.currentUser))
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.currentUser = EmptyCandidateObject
|
this.currentUser = EmptyCandidateObject
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.lsh = this.currentUser.lsh
|
this.lsh = this.currentUser.lsh
|
||||||
globalThis.lsh = this.lsh
|
globalThis.lsh = this.lsh
|
||||||
@ -1057,7 +1064,7 @@ struct UserInfo {
|
|||||||
.backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg'))
|
.backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg'))
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
console.log('this.startExam',this.startExam,this.systemParam.Param364)
|
console.log('this.startExam',this.startExam,this.systemParam.Param364,this.isExamStart)
|
||||||
if ((this.isExamStart && !globalThis.singlePlay&&this.systemParam.Param341)||(this.startExam&&this.systemParam.Param364=='2')) {
|
if ((this.isExamStart && !globalThis.singlePlay&&this.systemParam.Param341)||(this.startExam&&this.systemParam.Param364=='2')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export default class FilePhoto{
|
|||||||
}else{
|
}else{
|
||||||
try {
|
try {
|
||||||
console.info('surenjun','拍照开始')
|
console.info('surenjun','拍照开始')
|
||||||
const res = await takePhoto(params, this.context, 'pz/',2);
|
const res = await takePhoto(params, this.context, null,2);
|
||||||
console.info('surenjun','拍照结束' + JSON.stringify(res))
|
console.info('surenjun','拍照结束' + JSON.stringify(res))
|
||||||
return res.base64
|
return res.base64
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user