diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 529de1b1..83942af1 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -188,31 +188,15 @@ struct UserInfo { }) this.pageIndex = 0 this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) - const data = await getSyncData('USER') - const user = data[0] - if (user && Number(user.kssycs)) { - let flag = false - this.list.forEach(res => { - if (res.sfzmhm == user.sfzmhm) { - flag = true - 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 } - // 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) => { res.id = index.toString()