diff --git a/src/api/modules/courseStudy.js b/src/api/modules/courseStudy.js index fe0bffd2..11fca357 100644 --- a/src/api/modules/courseStudy.js +++ b/src/api/modules/courseStudy.js @@ -114,6 +114,10 @@ const studyVideoTime = function(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 @@ -408,6 +412,7 @@ export default { studyIndex, studyInfo, studyVideoTime, + updateStudyVideoTime, lastStudy, studyContent, appendStudyTime, diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 031ebf89..7ed2d0d6 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -1212,7 +1212,8 @@ this.contentData.lastStudyTime = intTime; let postData = { itemId: this.contentData.studyItemId, - videoTime: intTime + videoTime: intTime, + type: 0 }; //console.log('this.courseInfo:',this.contentData) if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){ @@ -1225,7 +1226,7 @@ } } //console.log('记录播放时间') - apiStudy.studyVideoTime(postData).then(rs => { + apiStudy.updateStudyVideoTime(postData).then(rs => { if (rs.status != 200) { console.log('记录播放时间错误'); } @@ -1560,9 +1561,10 @@ courseId: this.courseInfo.id, contentId: this.contentData.id, 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) { this.appentId = rs.result; studyUtil.clearStudyDuration(); //清除本地存储