定时器修改

This commit is contained in:
lvyuankang 2024-09-06 15:42:06 +08:00
parent 86e101e091
commit 6097346330

View File

@ -426,8 +426,10 @@ struct UserInfo {
that.interval = setInterval(() => { that.interval = setInterval(() => {
if (that.numCount < 3) { if (that.numCount < 3) {
that.numCount++ that.numCount++
if(that.list.length){
that.getExaminationStudentInfoFn() that.getExaminationStudentInfoFn()
} }
}
}, 5000) }, 5000)
}else{ }else{
that.getExaminationStudentInfoFn() that.getExaminationStudentInfoFn()
@ -436,7 +438,9 @@ struct UserInfo {
if(that.list.length == 0){ if(that.list.length == 0){
clearInterval(that.interval) clearInterval(that.interval)
that.interval = setInterval(() => { that.interval = setInterval(() => {
if(that.list.length){
that.getExaminationStudentInfoFn() that.getExaminationStudentInfoFn()
}
}, 5000) }, 5000)
}else{ }else{
that.getExaminationStudentInfoFn() that.getExaminationStudentInfoFn()