|
@@ -155,6 +155,7 @@
|
|
|
:isBuy="true"
|
|
|
:menuItem="item"
|
|
|
:levelId="'0-' + item.menuId"
|
|
|
+ :goodsType='6'
|
|
|
></courseChapter
|
|
|
></view>
|
|
|
<!--节 -->
|
|
@@ -678,7 +679,6 @@ export default {
|
|
|
...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- console.log('option====', option)
|
|
|
this.courseId = Number(option.courseId);
|
|
|
this.goodsId = Number(option.goodsId);
|
|
|
// this.gradeId = option.gradeId || 0
|
|
@@ -1533,6 +1533,7 @@ export default {
|
|
|
}
|
|
|
let self = this;
|
|
|
let data = {
|
|
|
+ fromPlat: 1, //来源平台 1小程序 2网站
|
|
|
photo: self.ossAvatarUrl,
|
|
|
sectionId: parseInt(sectionId),
|
|
|
goodsId: parseInt(self.goodsId),
|
|
@@ -1731,7 +1732,27 @@ export default {
|
|
|
clearTimeout(this.toastTimer);
|
|
|
this.videoToastShow = false;
|
|
|
},
|
|
|
+ // 新增用户视频学习日志
|
|
|
+ studyLog() {
|
|
|
+ this.$http({
|
|
|
+ url: '/user/study/log',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ goodsId: this.goodsId,
|
|
|
+ courseId: this.courseId,
|
|
|
+ moduleId: this.moduleId || 0,
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
+ sectionId: this.playSectionId || 0,
|
|
|
+ fromPlat: 1, //来源平台 1小程序 2PC网站
|
|
|
+ goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ console.log('直播的用户学习日志:', res)
|
|
|
+ })
|
|
|
+ },
|
|
|
onStateChange(newstate, oldstate) {
|
|
|
+ console.log('直播视频的开始播放事件', newstate.detail.newstate,this.needSeek)
|
|
|
if (newstate.detail.newstate == "playing") {
|
|
|
if (this.needSeek) {
|
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
@@ -1752,12 +1773,15 @@ export default {
|
|
|
|
|
|
polyvPlayerContext.play();
|
|
|
this.needSeek = false;
|
|
|
+ // 新增用户视频学习日志
|
|
|
+ this.studyLog()
|
|
|
}
|
|
|
//开始播放
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
|
this.timer = setInterval(this.timeEvent, 1000); //定时器
|
|
|
+
|
|
|
}
|
|
|
if (newstate.detail.newstate == "pause") {
|
|
|
clearInterval(this.timer);
|
|
@@ -1926,8 +1950,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getGoodsDetail() {
|
|
|
+ console.log('goodsDetail(------')
|
|
|
let self = this;
|
|
|
- // app/common/goods/'+ data
|
|
|
+ // goods/'+ data
|
|
|
this.$api.goodsDetail(this.goodsId).then((res) => {
|
|
|
self.goodsData = res.data.data;
|
|
|
console.log(self.gradeId, "班级ID");
|
|
@@ -1974,7 +1999,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMenuList() {
|
|
|
- let self = this;
|
|
|
+ // let self = this;
|
|
|
this.$api
|
|
|
.reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
|
|
|
.then((res) => {
|
|
@@ -1986,7 +2011,7 @@ export default {
|
|
|
item.name = item.menuName;
|
|
|
item.menuType = item.type;
|
|
|
}
|
|
|
- self.menuList = res.data.rows;
|
|
|
+ this.menuList = res.data.rows;
|
|
|
|
|
|
for (let i = 0; i < res.data.rows.length; i++) {
|
|
|
if (res.data.rows[i].type == 1) {
|
|
@@ -1997,6 +2022,8 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ console.log('--this.menuList:-', this.menuList)
|
|
|
}
|
|
|
});
|
|
|
},
|