|
@@ -4733,6 +4733,25 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 新增用户视频学习日志
|
|
|
+ studyLog(moduleId, chapterId, sectionId) {
|
|
|
+ this.$axios({
|
|
|
+ url: '/user/study/log',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ goodsId: this.goodsId,
|
|
|
+ courseId: this.courseId,
|
|
|
+ moduleId: moduleId || 0,
|
|
|
+ chapterId: chapterId || 0,
|
|
|
+ sectionId: sectionId || 0,
|
|
|
+ fromPlat: 2, //来源平台 1小程序 2PC网站
|
|
|
+ goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ console.log('直播的用户学习日志:', res)
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 点击节
|
|
|
*/
|
|
@@ -4773,7 +4792,6 @@ export default {
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
//没有答题次数限制
|
|
|
} else if (section.answerNum == 0) {
|
|
|
this.$router.push({
|
|
@@ -4795,6 +4813,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
@@ -4874,6 +4893,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
@@ -4896,7 +4916,6 @@ export default {
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
//没有答题次数限制
|
|
|
} else if (section.answerNum == 0) {
|
|
|
this.$router.push({
|
|
@@ -4918,6 +4937,7 @@ export default {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -5183,7 +5203,6 @@ export default {
|
|
|
//播放视频
|
|
|
this.showRecordStatus = false; //隐藏播放记录提示
|
|
|
this.sectionItem = option;
|
|
|
- console.log(option, "option");
|
|
|
this.isPlayRebuild = option.rebuild;
|
|
|
this.moduleId = option.moduleId || 0;
|
|
|
this.chapterId = option.chapterId || 0;
|
|
@@ -5207,13 +5226,14 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.clickLock = false;
|
|
|
}, 3000);
|
|
|
+ this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
|
|
|
// uni.$emit("levelId", this.levelId);
|
|
|
// uni.$emit("getSection", this.menuItem);
|
|
|
// uni.$emit("isRebuild", this.isRebuild);
|
|
|
}
|
|
|
if (option.sectionType == 2) {
|
|
|
//直播
|
|
|
-
|
|
|
+ // 直播下面不需要调用 this.studyLog(),因为跳到直播页面有调用
|
|
|
//提交保存观看历史
|
|
|
if (this.playSectionId) {
|
|
|
this.postStudyRecord(0, this.playSectionId);
|
|
@@ -5759,6 +5779,7 @@ export default {
|
|
|
console.log(this);
|
|
|
console.log(PlayDuration, "PlayDuration");
|
|
|
let data = {
|
|
|
+ fromPlat: 2, //来源平台 1小程序 2网站
|
|
|
photo: self.ossAvatarUrl,
|
|
|
sectionId: parseInt(this.playSectionId),
|
|
|
goodsId: parseInt(this.goodsId),
|