user
This commit is contained in:
parent
a12d8c79e9
commit
e828c532de
@ -57,8 +57,8 @@ export default class EntryAbility extends UIAbility {
|
|||||||
|
|
||||||
const windowClass = await windowStage.getMainWindow();
|
const windowClass = await windowStage.getMainWindow();
|
||||||
globalThis.windowClass = windowClass
|
globalThis.windowClass = windowClass
|
||||||
await windowClass.setWindowLayoutFullScreen(true)
|
// await windowClass.setWindowLayoutFullScreen(true)
|
||||||
// await windowClass.setWindowSystemBarEnable([]) //全屏
|
await windowClass.setWindowSystemBarEnable([]) //全屏
|
||||||
// await windowClass.setWindowSystemBarEnable(['navigation'])
|
// await windowClass.setWindowSystemBarEnable(['navigation'])
|
||||||
|
|
||||||
windowStage.loadContent('pages/Index', (err, data) => {
|
windowStage.loadContent('pages/Index', (err, data) => {
|
||||||
|
|||||||
@ -134,9 +134,11 @@ struct UserInfo {
|
|||||||
alignment: DialogAlignment.Center,
|
alignment: DialogAlignment.Center,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
aboutToAppear() {
|
aboutToAppear() {
|
||||||
this.avPlayer = new VoiceAnnounce();
|
this.avPlayer = new VoiceAnnounce();
|
||||||
}
|
}
|
||||||
|
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
this.isExamStart = false
|
this.isExamStart = false
|
||||||
this.startExam = false
|
this.startExam = false
|
||||||
@ -186,15 +188,31 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
this.pageIndex = 0
|
this.pageIndex = 0
|
||||||
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
if (this.dataList.length) {
|
const data = await getSyncData('USER')
|
||||||
setTimeout(()=>{
|
const user = data[0]
|
||||||
this.currentUser = this.dataList[0]
|
if (user && Number(user.kssycs)) {
|
||||||
this.currentUser.ksy2= globalThis.kgxm
|
let flag = false
|
||||||
globalThis.lsh=this.currentUser.lsh
|
this.list.forEach(res => {
|
||||||
},200)
|
if (res.sfzmhm == user.sfzmhm) {
|
||||||
} else {
|
flag = true
|
||||||
this.currentUser = EmptyCandidateObject
|
res.kssycs = user.kssycs
|
||||||
|
this.getCurrentStudent(res.sfzmhm)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
if (!flag) {
|
||||||
|
this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (this.dataList.length) {
|
||||||
|
//
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.currentUser = this.dataList[0]
|
||||||
|
// this.currentUser.ksy2= globalThis.kgxm
|
||||||
|
// globalThis.lsh=this.currentUser.lsh
|
||||||
|
// },200)
|
||||||
|
// } else {
|
||||||
|
// this.currentUser = EmptyCandidateObject
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
this.list.forEach((res, index) => {
|
this.list.forEach((res, index) => {
|
||||||
res.id = index.toString()
|
res.id = index.toString()
|
||||||
@ -638,26 +656,50 @@ 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)=>{
|
const user = this.dataList.filter(res => {
|
||||||
return res.sfzmhm==this.currentUser.sfzmhm
|
res.kssycs = '1'
|
||||||
}).length?true:false
|
})
|
||||||
if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){
|
|
||||||
if (this.dataList.length) {
|
if (this.dataList.length) {
|
||||||
|
if (user.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.currentUser = user[0]
|
||||||
|
this.currentUser.ksy2 = globalThis.kgxm
|
||||||
|
globalThis.lsh = this.currentUser.lsh
|
||||||
|
globalThis.ksyh = this.currentUser.ksy1sfzmhm
|
||||||
|
}, 200)
|
||||||
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.currentUser = this.dataList[0]
|
this.currentUser = this.dataList[0]
|
||||||
this.currentUser.ksy2 = globalThis.kgxm
|
this.currentUser.ksy2 = globalThis.kgxm
|
||||||
|
globalThis.ksyh = this.currentUser.ksy1sfzmhm
|
||||||
globalThis.lsh = this.currentUser.lsh
|
globalThis.lsh = this.currentUser.lsh
|
||||||
}, 200)
|
}, 200)
|
||||||
console.log('this.currentUser1',JSON.stringify(this.currentUser))
|
}
|
||||||
} else {
|
} else {
|
||||||
this.currentUser = EmptyCandidateObject
|
this.currentUser = EmptyCandidateObject
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
this.lsh = this.currentUser.lsh
|
// const flag=dataList.filter((res)=>{
|
||||||
globalThis.lsh = this.lsh
|
// return res.sfzmhm==this.currentUser.sfzmhm
|
||||||
globalThis.ksyh = this.currentUser.ksy1sfzmhm
|
// }).length?true:false
|
||||||
|
// if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){
|
||||||
|
// if (this.dataList.length) {
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.currentUser = this.dataList[0]
|
||||||
|
// this.currentUser.ksy2= globalThis.kgxm
|
||||||
|
// globalThis.lsh=this.currentUser.lsh
|
||||||
|
// },200)
|
||||||
|
// console.log('this.currentUser1',JSON.stringify(this.currentUser))
|
||||||
|
// } else {
|
||||||
|
// this.currentUser = EmptyCandidateObject
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// this.lsh = this.currentUser.lsh
|
||||||
|
// globalThis.lsh = this.lsh
|
||||||
|
// globalThis.ksyh = this.currentUser.ksy1sfzmhm
|
||||||
|
|
||||||
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
|
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
|
||||||
if (this.systemParam.Param364 == '2') {
|
if (this.systemParam.Param364 == '2') {
|
||||||
@ -968,7 +1010,6 @@ struct UserInfo {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//开始考试准备
|
//开始考试准备
|
||||||
prePareExam = async () => {
|
prePareExam = async () => {
|
||||||
if (this.ksksLimit) {
|
if (this.ksksLimit) {
|
||||||
@ -1137,11 +1178,13 @@ struct UserInfo {
|
|||||||
Column() {
|
Column() {
|
||||||
// Image($r('app.media.yydj_btn'))
|
// Image($r('app.media.yydj_btn'))
|
||||||
// .commStyle()
|
// .commStyle()
|
||||||
imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.yydj_btn')}).margin({ bottom: 12 * this.ratio })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.yydj_btn') })
|
||||||
|
.margin({ bottom: 12 * this.ratio })
|
||||||
|
|
||||||
// Image($r('app.media.gx_btn'))
|
// Image($r('app.media.gx_btn'))
|
||||||
// .commStyle()
|
// .commStyle()
|
||||||
imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.gx_btn')}).margin({ bottom: 12 * this.ratio })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.gx_btn') })
|
||||||
|
.margin({ bottom: 12 * this.ratio })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
// this.avPlayer.playAudio(['button_media.wav'])
|
// this.avPlayer.playAudio(['button_media.wav'])
|
||||||
if (this.isExamStart && !globalThis.singlePlay) {
|
if (this.isExamStart && !globalThis.singlePlay) {
|
||||||
@ -1153,7 +1196,8 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
// Image($r('app.media.qk_btn'))
|
// Image($r('app.media.qk_btn'))
|
||||||
// .commStyle()
|
// .commStyle()
|
||||||
imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.qk_btn')}).margin({ bottom: 12 * this.ratio })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.qk_btn') })
|
||||||
|
.margin({ bottom: 12 * this.ratio })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
// this.avPlayer.playAudio(['button_media.wav'])
|
// this.avPlayer.playAudio(['button_media.wav'])
|
||||||
// 已开始考试不能缺考 已考过一次学员不能缺考 车上不能缺考
|
// 已开始考试不能缺考 已考过一次学员不能缺考 车上不能缺考
|
||||||
@ -1167,7 +1211,8 @@ struct UserInfo {
|
|||||||
if (this.isBoardPrePareSetPopupOpen && (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2') && !this.isFirstBoardPrePareSetPopupBtnShow) {
|
if (this.isBoardPrePareSetPopupOpen && (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2') && !this.isFirstBoardPrePareSetPopupBtnShow) {
|
||||||
//上车准备
|
//上车准备
|
||||||
// Image($r('app.media.sczb_btn')).commStyle()
|
// Image($r('app.media.sczb_btn')).commStyle()
|
||||||
imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.sczb_btn')}).margin({ bottom: 12 * this.ratio })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.sczb_btn') })
|
||||||
|
.margin({ bottom: 12 * this.ratio })
|
||||||
.onClick(async () => {
|
.onClick(async () => {
|
||||||
if (this.systemParam.Param612Str == '1') {
|
if (this.systemParam.Param612Str == '1') {
|
||||||
return
|
return
|
||||||
@ -1177,7 +1222,8 @@ struct UserInfo {
|
|||||||
} else {
|
} else {
|
||||||
// Image($r('app.media.ksks_btn'))
|
// Image($r('app.media.ksks_btn'))
|
||||||
// .commStyle()
|
// .commStyle()
|
||||||
imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.ksks_btn')}).margin({ bottom: 12 * this.ratio })
|
imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') })
|
||||||
|
.margin({ bottom: 12 * this.ratio })
|
||||||
.onClick(async () => {
|
.onClick(async () => {
|
||||||
if (this.systemParam.Param612Str == '1') {
|
if (this.systemParam.Param612Str == '1') {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user