Commit b1493d64 authored by linwenqing's avatar linwenqing

fix:学习考试bug

parent 9e03467d
......@@ -198,16 +198,15 @@ export default {
}
if (res.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
if (res.data.examStatus == 2) {
if (that.isOnLoad && (res.data.examStatus == 1 || res.data.examStatus == 2)) {
//刚进来是考试完成和未参与,直接申请考试
that.isOnLoad = false;
that.applyExam();
return;
}
that.isOnLoad = false;
if (res.data.examStatus == 1) {
if(that.isOnLoad){
that.applyExam();
that.isOnLoad = false;
return;
}
that.isComplete = true;
that.examScore = res.data.examScore;
return;
......@@ -217,15 +216,15 @@ export default {
let key = 'exma-' + this.examId;
let limitTime = uni.getStorageSync(key);
if(limitTime < 0){
if(limitTime <= 0 || limitTime == ""){
let time = parseInt(
this.timeDefine["time-id-" + this.examId]
that.timeDefine["time-id-" + that.examId]
);
this.endTime = time;
this.currentTime = parseInt(time * 1000);
that.endTime = time;
that.currentTime = parseInt(time * 1000);
}else{
this.endTime = parseInt(limitTime);
this.currentTime = parseInt(limitTime * 1000);
that.endTime = parseInt(limitTime);
that.currentTime = parseInt(limitTime * 1000);
}
that.getNext();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment