diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 636677d8..2f288112 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -132,43 +132,42 @@ struct UserInfo { // this.openDeviceByIDCard() const routerParam=router.getParams()||{type :0}; console.log('routerParam',JSON.stringify(routerParam)) - // @ts-ignore - if(routerParam.type!=1){ + if(!globalThis.singlePlay){ // @ts-ignore - this.list =await getSyncData('USERLIST') - // @ts-ignore - const data=await getSyncData('USER') - console.log('datadata',JSON.stringify(data)); - console.log('datadata2',JSON.stringify(this.list)) + if(routerParam.type!=1){ + // @ts-ignore + this.list =await getSyncData('USERLIST') + // @ts-ignore + const data=await getSyncData('USER') + const user=data[0] + if(user&&Number(user.kssycs)){ + this.list.forEach(res=>{ + if(res.sfzmhm==user.sfzmhm){ + res.kssycs=user.kssycs + this.getCurrentStudent(res.sfzmhm) + } + }) - const user=data[0] - if(user&&Number(user.kssycs)){ - this.list.forEach(res=>{ - if(res.sfzmhm==user.sfzmhm){ - res.kssycs=user.kssycs - this.getCurrentStudent(res.sfzmhm) + }else if(user&&(user.kssycs=='0'||user.kssycs=='')){ + console.log('datadatadatadata') + this.list=this.list.filter(res=>{ + return res.sfzmhm!=user.sfzmhm + }) + this.pageIndex=0 + this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) + if(this.dataList.length){ + this.currentUser=this.dataList[0] + }else{ + this.currentUser=EmptyCandidateObject } - }) - - }else if(user&&(user.kssycs=='0'||user.kssycs=='')){ - console.log('datadatadatadata') - this.list=this.list.filter(res=>{ - return res.sfzmhm!=user.sfzmhm - }) - this.pageIndex=0 - this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) - if(this.dataList.length){ - this.currentUser=this.dataList[0] - }else{ - this.currentUser=EmptyCandidateObject } + this.list.forEach((res,index)=>{ + res.id=index.toString() + }) + await upDateTableByArray('USERLIST', this.list||[]) + }else{ + this.getExaminationStudentInfoFn() } - this.list.forEach((res,index)=>{ - res.id=index.toString() - }) - await upDateTableByArray('USERLIST', this.list||[]) - }else{ - this.getExaminationStudentInfoFn() }