diff --git a/src/components/Article/collectList.vue b/src/components/Article/collectList.vue index af97905d..3b983ce1 100644 --- a/src/components/Article/collectList.vue +++ b/src/components/Article/collectList.vue @@ -2,24 +2,24 @@
-
+
diff --git a/src/components/Case/collectList.vue b/src/components/Case/collectList.vue index abe2f2ff..62686d94 100644 --- a/src/components/Case/collectList.vue +++ b/src/components/Case/collectList.vue @@ -5,14 +5,14 @@
- +
- +
@@ -142,7 +142,7 @@ } .article-info { - + .article-info-title { font-size: 16px; font-weight: 400; diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index e380f203..a235855e 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -179,9 +179,14 @@ export default { this.loadExamInfo(); } }, + destroyed() { + if(this.timer){ + window.clearInterval(this.timer); + } + }, methods: { changeTimer(){ - if(this.timerValue==0){ + if(this.timerValue<=0){ window.clearInterval(this.timer); //系统自动提交 this.confirmStop(); @@ -298,7 +303,7 @@ export default { confirmButtonText: '确定', showClose:false, callback: action => { - this.submitTest(); + this.submitTest(); } }); @@ -332,7 +337,7 @@ export default { }).then(() => { this.submitTest() }).catch(()=>{ - + }) }else{ this.submitTest() @@ -397,6 +402,10 @@ export default { return this.lastScore; }, submitTest(){ //提交处理 + //清空提示 + if(this.timer){ + window.clearInterval(this.timer); + } let now=new Date(); let testScore=this.countTest(); let postData={ @@ -419,7 +428,7 @@ export default { var dateDiff = now.getTime() - this.startTime.getTime();//时间差的毫秒数 var minutes=Math.floor(dateDiff/(1000))//计算相差秒数,分钟记录的太大,经常为0 postData.testDuration=minutes; - + apiStudy.saveExam(postData).then(res=>{ if(res.status == 200) { this.records.push(res.result);