提交修改

This commit is contained in:
daihh
2022-11-16 17:56:03 +08:00
parent 9cfbeb4e8f
commit 5fa79d372c
2 changed files with 15 additions and 27 deletions

View File

@@ -242,6 +242,8 @@ export default {
toScoreTow,
examId:'',//考试的id
taskId:'',//考试任务的id
refId:'',//关联的id
refType:'1',//关联的类型,1表默认的独立考试
lastId:'',//最后一次提交的答卷
canExam:false,//能否参加考试
noExam:false,//不能参加考试
@@ -296,7 +298,14 @@ export default {
...mapGetters(['userInfo'])
},
mounted() {
this.examId = this.$route.query.id
this.examId = this.$route.query.id;
if(this.$route.query.refId){
this.refId = this.$route.query.refId;
}
if(this.$route.query.refType){
this.refType = this.$route.query.refType;
}
if(this.examId) {
this.loadData()
}else{
@@ -506,6 +515,7 @@ export default {
}
let that = this;
let data = {};
data.aloneId=this.taskId;
data.testId = this.testPaper.id;
data.testName = this.testPaper.testName;
data.testDuration = this.testPaper.testDuration;

View File

@@ -1070,7 +1070,7 @@
},
audioPause() {
//console.log("暂停");
this.stopStudyTime();//启动追加学习时长
this.stopStudyTime();//停止追加学习时长
},
audioEnd() {
//console.log("播放结束");
@@ -1342,35 +1342,13 @@
let sen = parseInt(m / 1000); //计算秒数
duration = duration + $this.appentInterval/1000;//追加的是秒
if (sen>=60) { //一分钟保存一次
this.saveStudyDuration(duration);
// if (duration > 0) {
// let postData = {
// id: this.appentId,
// studyId: this.studyId,
// courseId: this.courseInfo.id,
// contentId: this.contentData.id,
// studyInfo: this.courseInfo.name +
// "-" +
// this.contentData.contentName,
// duration: duration
// };
// apiStudy.appendStudyTime(postData).then(rs => {
// if (rs.status == 200) {
// $this.appentId = rs.result;
// $this.appendStartTime = new Date(); //重置开始时间
// studyUtil.clearStudyDuration(); //清除本地存储
// //this.appendHandle=setTimeout(function() {$this.appendStudyTime();}, $this.appentInterval);
// } else {
// console.log(rs.message);
// }
// });
// }
this.saveStudyDuration(duration);
} else {
studyUtil.setStudyDuration(duration); //添加到本地存储中
studyUtil.setStudyDuration(duration); //添加到本地存储中
}
//启动下次追加学习时长
this.appendHandle = setTimeout(function() {
$this.appendStudyTime();
$this.appendStudyTime();
}, $this.appentInterval);
},