mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 09:56:45 +08:00
fix: 修复播放视频时不记录时间的问题
在请求 studyContent 的时候,手动接收里面的数值
This commit is contained in:
@@ -1180,6 +1180,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 切换课程之后 studyItemId 没有及时清理, 导致 chrome 系列的浏览器
|
||||||
|
// 切换课程之后不会重新计算观看时间位置
|
||||||
|
this.curContent.studyItemId = ''
|
||||||
},
|
},
|
||||||
followUser(tea) {
|
followUser(tea) {
|
||||||
//实现关注处理
|
//实现关注处理
|
||||||
@@ -1720,8 +1723,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPlayerPlaying(e) {
|
onPlayerPlaying(e) {
|
||||||
console.log("=======courseStudy");
|
if (!this.curContent.studyItemId || (e.detail.currentTime > 2 && this.trueFalse && this.curContent.status < 9)) {
|
||||||
if (e.detail.currentTime > 2 && this.trueFalse && this.curContent.status < 9) {
|
|
||||||
let params = {
|
let params = {
|
||||||
studyId: this.studyId,//学习id,
|
studyId: this.studyId,//学习id,
|
||||||
courseId: this.courseId,//课程id,
|
courseId: this.courseId,//课程id,
|
||||||
@@ -1732,7 +1734,14 @@ export default {
|
|||||||
status: 2,
|
status: 2,
|
||||||
contentTotal: this.totalContent
|
contentTotal: this.totalContent
|
||||||
}
|
}
|
||||||
apiCourseStudy.studyContent(params)
|
apiCourseStudy.studyContent(params).then(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.curContent.status = 9;//完成
|
||||||
|
this.curContent.studyItemId = res.result;//学习记录id
|
||||||
|
} else {
|
||||||
|
console.log('记录学习失败:' + res.message + ',' + res.error);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.trueFalse = false
|
this.trueFalse = false
|
||||||
}
|
}
|
||||||
//console.log("当前播放11",itme);
|
//console.log("当前播放11",itme);
|
||||||
|
|||||||
Reference in New Issue
Block a user