|
@@ -703,6 +703,7 @@ export default {
|
|
|
...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
+ console.log('onLoadonLoadonLoadonLoadonLoad-')
|
|
|
this.courseId = Number(option.id) || '';
|
|
|
this.goodsId = Number(option.goodsId);
|
|
|
this.orderGoodsId = Number(option.orderGoodsId) || '';
|
|
@@ -719,6 +720,7 @@ export default {
|
|
|
this.$store.getters.dictObj;
|
|
|
},
|
|
|
onShow() {
|
|
|
+ console.log('onShowonShowonShowv')
|
|
|
if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
|
return;
|
|
|
}
|
|
@@ -729,6 +731,7 @@ export default {
|
|
|
this.originUnload()
|
|
|
},
|
|
|
mounted() {
|
|
|
+ console.log('mountedmountedmountedmounted')
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["updateChapterOpen","updateLiveLast"]),
|
|
@@ -768,7 +771,6 @@ export default {
|
|
|
this.getUserWatchLast()
|
|
|
// this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
} else if(res.data.total == 1) {
|
|
|
- console.log('111->this.courseId', this.courseId)
|
|
|
this.originOnShow()
|
|
|
this.originMounted()
|
|
|
}
|
|
@@ -795,7 +797,7 @@ export default {
|
|
|
if (res.data.code == 200) {
|
|
|
if (res.data.data && Object.keys(res.data.data).length) { //有最后一次看的录播的信息
|
|
|
this.courseId = res.data.data.courseId
|
|
|
- console.log('res.data', res.data, this.courseId)
|
|
|
+ console.log('查询用户最后一次看的录播的信息', res.data, this.courseId)
|
|
|
this.originOnShow()
|
|
|
this.originMounted()
|
|
|
} else {
|
|
@@ -846,7 +848,7 @@ export default {
|
|
|
},
|
|
|
// 原来的mouted内容
|
|
|
originMounted() {
|
|
|
- // console.log('originMounted')
|
|
|
+ console.log('originMounted')
|
|
|
uni.$on("changeSection", (oldSectionId) => {
|
|
|
console.log('originMounted->playVID:', this.playVID, oldSectionId);
|
|
|
this.hasStart = false;
|
|
@@ -870,14 +872,13 @@ export default {
|
|
|
this.photoConfig = false;
|
|
|
this.photoIndex = 0;
|
|
|
this.sectionItem = item;
|
|
|
-
|
|
|
this.moduleId = item.moduleId
|
|
|
this.chapterId = item.chapterId
|
|
|
|
|
|
this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
|
this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
|
|
|
console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
|
|
|
- this.postStudyRecord(0)
|
|
|
+ // this.postStudyRecord(0)
|
|
|
//获取拍照历史
|
|
|
this.getPhotoLastRecord();
|
|
|
this.playVideo(item);
|
|
@@ -912,7 +913,7 @@ export default {
|
|
|
console.log('playSectionId', this.playSectionId)
|
|
|
if (this.playSectionId > 0 && this.hasStart) {
|
|
|
//退出提交记录
|
|
|
- console.log('退出提交记录sfhasdoufsou敖德萨所多')
|
|
|
+ console.log('退出提交记录sfhasdoufsou敖德萨所多', this.courseId)
|
|
|
this.postStudyRecord();
|
|
|
}
|
|
|
//清除正在播放的节ID
|
|
@@ -921,14 +922,12 @@ export default {
|
|
|
this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
|
this.closePlv();
|
|
|
- // console.log("-----onUnload");
|
|
|
//移除所有的事件监听器
|
|
|
uni.$off();
|
|
|
clearInterval(this.answerTimer);
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
|
- console.log(this.lockTimer, "this.lockTimer");
|
|
|
if (this.lockTimer) {
|
|
|
clearInterval(this.lockTimer);
|
|
|
this.$api
|
|
@@ -948,11 +947,11 @@ export default {
|
|
|
this.toggleCourseShow = false
|
|
|
},
|
|
|
// 进入学习
|
|
|
- jump(item, index) {
|
|
|
- console.log('item------>', item, item.goodsId, item.gradeId, item.courseId, item.orderGoodsId)
|
|
|
+ async jump(item, index) {
|
|
|
+ console.log('item------>', item,'courseId:',item.courseId, 'goodsId:', this.goodsId, 'orderGoodsId:',item.orderGoodsId)
|
|
|
this.vid = ''
|
|
|
this.hasStart = true
|
|
|
- this.originUnload()
|
|
|
+ await this.originUnload()
|
|
|
// return
|
|
|
this.reStart = false
|
|
|
this.courseId = item.courseId
|
|
@@ -1162,7 +1161,7 @@ export default {
|
|
|
orderGoodsId:this.orderGoodsId,
|
|
|
courseId:this.courseId
|
|
|
}).then(res => {
|
|
|
- console.log(res,'couse')
|
|
|
+ console.log(res,'couse最后一次观看的视频', this.courseId)
|
|
|
if(res.data.data) {
|
|
|
this.moduleId = res.data.data.moduleId
|
|
|
this.chapterId = res.data.data.chapterId
|
|
@@ -1171,7 +1170,7 @@ export default {
|
|
|
this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
|
|
|
this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
|
|
|
|
|
|
- console.log('playVID:', this.playVID, '-', this.playSectionId, this.moduleId, this.chapterId)
|
|
|
+ console.log('playVID:', this.playVID, 'playSectionId-', this.playSectionId, 'moduleId:', this.moduleId,'chapterId:', this.chapterId, 'courseId:', this.courseId)
|
|
|
this.sectionItem = res.data.data;
|
|
|
this.playVideo(res.data.data)
|
|
|
} else if(res.data.data.sectionType == 2) { //直播
|
|
@@ -1363,7 +1362,7 @@ export default {
|
|
|
this.$api
|
|
|
.reMenuList({ courseId: this.courseId, gradeId: this.gradeId ,orderGoodsId: this.orderGoodsId,})
|
|
|
.then((res) => {
|
|
|
- console.log("noRebuild3");
|
|
|
+ console.log("noRebuild3-->this.courseId:", this.courseId);
|
|
|
console.log("noRebuild3index", index);
|
|
|
if (res.data.code == 200) {
|
|
|
res.data.rows[index].name = res.data.rows[index].menuName;
|
|
@@ -1402,7 +1401,7 @@ export default {
|
|
|
let self = this;
|
|
|
this.getCameraSetting();
|
|
|
this.$api.getbaseprofiletplists({ goodsId: self.goodsId,orderGoodsId: this.orderGoodsId, }).then((res) => {
|
|
|
- console.log(res, "res1");
|
|
|
+ // console.log(res, "res1");
|
|
|
if (res.data.code === 200 && res.data.rows.length) {
|
|
|
if (res.data.rows[0].keyValue) {
|
|
|
self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
|
|
@@ -1647,7 +1646,7 @@ export default {
|
|
|
timeInterval: postTime ? self.photoList.join(",") : "",
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
- console.log("提交接口", data);
|
|
|
+ // console.log("提交接口", data);
|
|
|
this.$api
|
|
|
.coursePhotoRecord(data)
|
|
|
.then((res) => {
|
|
@@ -1947,14 +1946,14 @@ export default {
|
|
|
polyvPlayerContext && polyvPlayerContext.changeVid(item.recordingUrl);
|
|
|
} else {
|
|
|
this.vid = item.recordingUrl;
|
|
|
- console.log('---------vid----', this.vid)
|
|
|
}
|
|
|
this.recordObj = null;
|
|
|
this.recordObj = await this.getRecordLast();
|
|
|
console.log('this.recordObj:', this.recordObj)
|
|
|
this.needSeek = true; //跳转到播放记录
|
|
|
this.startStatus = true;
|
|
|
-
|
|
|
+ // 提交学习记录
|
|
|
+ this.postStudyRecord(0)
|
|
|
//获取节笔记
|
|
|
this.getNoteList();
|
|
|
},
|
|
@@ -2170,7 +2169,7 @@ export default {
|
|
|
this.postAnswer();
|
|
|
},
|
|
|
postStudyRecord(status = 0, sectionId = this.playSectionId) {
|
|
|
- console.log("status", status);
|
|
|
+ // console.log("status", status);
|
|
|
let currentTime = 0;
|
|
|
let PlayDuration = 0;
|
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
@@ -2200,12 +2199,12 @@ export default {
|
|
|
),
|
|
|
};
|
|
|
if (status > 0) {
|
|
|
- console.log(sectionId, "sectionId");
|
|
|
data.status = status;
|
|
|
}
|
|
|
- console.log("提交接口", data, sectionId, self.chapterId, self.moduleId);
|
|
|
+ console.log("提交接口", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
|
|
|
// return
|
|
|
this.$api.studyRecord(data).then((res) => {
|
|
|
+ console.log('提交接口的结果:', res)
|
|
|
if (res.data.code == 200) {
|
|
|
if (status > 0) {
|
|
|
let moduleId = this.moduleId || 0;
|
|
@@ -2229,7 +2228,7 @@ export default {
|
|
|
title: res.data.msg,
|
|
|
});
|
|
|
}
|
|
|
- console.log(res, "res");
|
|
|
+ // console.log(res, "res");
|
|
|
});
|
|
|
},
|
|
|
uploadFile(options, int) {
|
|
@@ -2770,11 +2769,9 @@ export default {
|
|
|
openDocument() {
|
|
|
this.downLoading = true
|
|
|
let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
|
|
|
- console.log(url);
|
|
|
uni.downloadFile({
|
|
|
url: url,
|
|
|
success: (res) => {
|
|
|
- console.log(999);
|
|
|
var filePath = res.tempFilePath;
|
|
|
uni.openDocument({
|
|
|
filePath: filePath,
|