Commit b1493d64 authored by linwenqing's avatar linwenqing

fix:学习考试bug

parent 9e03467d
...@@ -198,16 +198,15 @@ export default { ...@@ -198,16 +198,15 @@ export default {
} }
if (res.code == 200) { if (res.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与 //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(); that.applyExam();
return; return;
} }
if (res.data.examStatus == 1) {
if(that.isOnLoad){
that.applyExam();
that.isOnLoad = false; that.isOnLoad = false;
return;
} if (res.data.examStatus == 1) {
that.isComplete = true; that.isComplete = true;
that.examScore = res.data.examScore; that.examScore = res.data.examScore;
return; return;
...@@ -217,15 +216,15 @@ export default { ...@@ -217,15 +216,15 @@ export default {
let key = 'exma-' + this.examId; let key = 'exma-' + this.examId;
let limitTime = uni.getStorageSync(key); let limitTime = uni.getStorageSync(key);
if(limitTime < 0){ if(limitTime <= 0 || limitTime == ""){
let time = parseInt( let time = parseInt(
this.timeDefine["time-id-" + this.examId] that.timeDefine["time-id-" + that.examId]
); );
this.endTime = time; that.endTime = time;
this.currentTime = parseInt(time * 1000); that.currentTime = parseInt(time * 1000);
}else{ }else{
this.endTime = parseInt(limitTime); that.endTime = parseInt(limitTime);
this.currentTime = parseInt(limitTime * 1000); that.currentTime = parseInt(limitTime * 1000);
} }
that.getNext(); 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