mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
提交修改
This commit is contained in:
@@ -653,6 +653,8 @@
|
||||
}, 5000); //5秒后记录学习完成
|
||||
}else{
|
||||
//scorm课件不记录完成情况,由播放回调记录完成情况
|
||||
//当前先保存学习记录,未学习状态
|
||||
this.saveScormStudy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1255,6 +1257,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
saveScormStudy() {
|
||||
//只记录SCORM课件的学习
|
||||
if (this.contentData.contentType != 50) {
|
||||
return;
|
||||
}
|
||||
if (this.contentData.status == 9) {
|
||||
//已学习完的,不会再记录
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
studyId: this.studyId, //学习id,
|
||||
courseId: this.courseId, //课程id,
|
||||
contentId: this.contentData.id, //内容id,
|
||||
contentType: this.contentData.contentType,
|
||||
contentName: this.contentData.contentName, //内容名称
|
||||
progress: 0,
|
||||
status: 1,
|
||||
contentTotal: this.totalContent
|
||||
};
|
||||
apiStudy.studyContent(params).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.contentData.status = 2; //进行中
|
||||
this.contentData.studyItemId = res.result; //学习记录id
|
||||
} else {
|
||||
console.log('记录学习失败:' + res.message + ',' + res.error);
|
||||
}
|
||||
});
|
||||
},
|
||||
saveStudyInfo() {
|
||||
//记录课件学习信息
|
||||
if (this.contentData.contentType >= 60) {
|
||||
|
||||
Reference in New Issue
Block a user