先修改对应的后端接口

This commit is contained in:
sunhonglai
2025-04-16 10:19:56 +08:00
parent 4c1c370879
commit dc7f942303
2 changed files with 11 additions and 4 deletions

View File

@@ -114,6 +114,10 @@ const studyVideoTime = function(data) {
return ajax.post('/xboe/school/study/course/study-video-time',data); return ajax.post('/xboe/school/study/course/study-video-time',data);
} }
const updateStudyVideoTime = function(data) {
return ajax.post('/xboe/school/study/course/updateStudyVideoTime',data);
}
/** /**
* 获取上一次的学习内容 * 获取上一次的学习内容
* @returns * @returns
@@ -408,6 +412,7 @@ export default {
studyIndex, studyIndex,
studyInfo, studyInfo,
studyVideoTime, studyVideoTime,
updateStudyVideoTime,
lastStudy, lastStudy,
studyContent, studyContent,
appendStudyTime, appendStudyTime,

View File

@@ -1212,7 +1212,8 @@
this.contentData.lastStudyTime = intTime; this.contentData.lastStudyTime = intTime;
let postData = { let postData = {
itemId: this.contentData.studyItemId, itemId: this.contentData.studyItemId,
videoTime: intTime videoTime: intTime,
type: 0
}; };
//console.log('this.courseInfo:',this.contentData) //console.log('this.courseInfo:',this.contentData)
if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){ if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){
@@ -1225,7 +1226,7 @@
} }
} }
//console.log('记录播放时间') //console.log('记录播放时间')
apiStudy.studyVideoTime(postData).then(rs => { apiStudy.updateStudyVideoTime(postData).then(rs => {
if (rs.status != 200) { if (rs.status != 200) {
console.log('记录播放时间错误'); console.log('记录播放时间错误');
} }
@@ -1560,9 +1561,10 @@
courseId: this.courseInfo.id, courseId: this.courseInfo.id,
contentId: this.contentData.id, contentId: this.contentData.id,
studyInfo: this.courseInfo.name +"-" +this.contentData.contentName, studyInfo: this.courseInfo.name +"-" +this.contentData.contentName,
duration: duration duration: duration,
type: 1
}; };
apiStudy.appendStudyTime(postAppendData).then(rs => { apiStudy.updateStudyVideoTime(postAppendData).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
this.appentId = rs.result; this.appentId = rs.result;
studyUtil.clearStudyDuration(); //清除本地存储 studyUtil.clearStudyDuration(); //清除本地存储