mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
提交修改
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user