mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
收藏中案例,文章等头像不能点击进入个人主页的问题
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user