From 8746904cb99b7a97cff1686d906dc2a602b18eab Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Fri, 18 Apr 2025 08:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E6=97=B6=E9=95=BF=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E6=8E=A5=E5=8F=A3=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/study/coursenew.vue | 63 ++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 53c3365c..56c296d6 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -1185,7 +1185,12 @@ let postData = { itemId: this.contentData.studyItemId, videoTime: intTime, - type: 0 + id: this.appentId, + studyId: this.studyId, + courseId: this.contentData.courseId, + contentId: this.contentData.id, + studyInfo: this.courseInfo.name +"-" +this.contentData.contentName, + duration: 10 }; //console.log('this.courseInfo:',this.contentData) if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){ @@ -1193,14 +1198,16 @@ var arr = time&&JSON.parse(time) || {} if(arr[this.blobId] && this.contentData.progressVideo { if (rs.status != 200) { console.log('记录播放时间错误'); + }else{ + studyUtil.clearStudyDuration(); //清除本地存储 } }); } @@ -1237,7 +1244,13 @@ this.contentData.lastStudyTime = intTime; let postData = { itemId: this.contentData.studyItemId, - videoTime: intTime + videoTime: intTime, + id: this.appentId, + studyId: this.studyId, + courseId: this.contentData.courseId, + contentId: this.contentData.id, + studyInfo: this.courseInfo.name +"-" +this.contentData.contentName, + duration: 10 }; //console.log('this.courseInfo:',this.contentData) if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){ @@ -1245,14 +1258,16 @@ var arr = time&&JSON.parse(time) || {} if(arr[this.blobId] && this.contentData.progressVideo { + apiStudy.updateStudyVideoTime(postData).then(rs => { if (rs.status != 200) { console.log('记录播放时间错误'); + }else{ + studyUtil.clearStudyDuration(); //清除本地存储 } }); } @@ -1527,23 +1542,23 @@ console.log(rs.message); } }); - let postAppendData = { - id: this.appentId, - studyId: this.studyId, - courseId: this.courseInfo.id, - contentId: this.contentData.id, - studyInfo: this.courseInfo.name +"-" +this.contentData.contentName, - duration: duration, - type: 1 - }; - apiStudy.updateStudyVideoTime(postAppendData).then(rs => { - if (rs.status == 200) { - this.appentId = rs.result; - studyUtil.clearStudyDuration(); //清除本地存储 - } else { - console.log(rs.message); - } - }); + // let postAppendData = { + // id: this.appentId, + // studyId: this.studyId, + // courseId: this.courseInfo.id, + // contentId: this.contentData.id, + // studyInfo: this.courseInfo.name +"-" +this.contentData.contentName, + // duration: duration, + // type: 1 + // }; + // apiStudy.updateStudyVideoTime(postAppendData).then(rs => { + // if (rs.status == 200) { + // this.appentId = rs.result; + // studyUtil.clearStudyDuration(); //清除本地存储 + // } else { + // console.log(rs.message); + // } + // }); } }, //结束追加学习时长