|
@@ -777,6 +777,7 @@ export default {
|
|
|
CountTo: 30, // 倒计时
|
|
|
menuAllList: [],
|
|
|
popupPhotoShow: false,
|
|
|
+ curPlayIndex: 0, // 正在播放的节的下标
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -1042,7 +1043,7 @@ export default {
|
|
|
// 原来的mouted内容
|
|
|
originMounted() {
|
|
|
uni.$on("changeSection", (oldSectionId) => {
|
|
|
- // console.log('切换课程-originMounted->playVID:', this.playVID, oldSectionId);
|
|
|
+ console.log('切换课程-originMounted->playVID:', this.playVID, oldSectionId);
|
|
|
this.studyTimer && clearInterval(this.studyTimer) // 清除定时器
|
|
|
this.hasStart = false;
|
|
|
this.photoConfig = false;
|
|
@@ -1076,6 +1077,7 @@ export default {
|
|
|
this.playVideo(item);
|
|
|
});
|
|
|
uni.$on("levelId", (item) => {
|
|
|
+ console.log('点击节获取的各层级ID', item);
|
|
|
let arr = item.split("-");
|
|
|
//点击节获取的各层级ID
|
|
|
this.moduleId = arr[0];
|
|
@@ -1404,7 +1406,6 @@ 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, 'playSectionId-', this.playSectionId, 'moduleId:', this.moduleId,'chapterId:', this.chapterId, 'courseId:', this.courseId)
|
|
|
this.sectionItem = res.data.data;
|
|
|
await this.getPhotoLastRecord() // 获取拍照历史
|
|
|
this.playVideo(res.data.data)
|
|
@@ -1634,9 +1635,9 @@ export default {
|
|
|
goodsId:this.goodsId
|
|
|
}).then(res => {
|
|
|
let nowTime = Number(new Date().getTime()/1000).toFixed(0)
|
|
|
- // this.livingItem = res.data.data[0]
|
|
|
if (res.data.data) {
|
|
|
this.menuAllList = res.data.data
|
|
|
+ // console.log('======0', this.sectionItem);
|
|
|
this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
|
|
|
}
|
|
|
})
|
|
@@ -2450,6 +2451,7 @@ export default {
|
|
|
fromRebuild: this.isRebuild,
|
|
|
}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
|
|
|
uni.$emit("playNext" + playNextId); //通知播放结束
|
|
|
+ uni.$emit('playNextSection', this.curPlayIndex) // 播放下一节
|
|
|
}
|
|
|
|
|
|
self.ossAvatarUrl = "";
|
|
@@ -2575,7 +2577,7 @@ export default {
|
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
|
if (polyvPlayerContext != null) {
|
|
|
this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
|
|
|
- console.log('拍照啊', 789, this.photoHistoryList, 'this.photoList:', this.photoList)
|
|
|
+ // console.log('拍照啊', 789, this.photoHistoryList, 'this.photoList:', this.photoList)
|
|
|
//判断是否需要拍照
|
|
|
if (this.photoNum > 0) {
|
|
|
this.configPhoto();
|
|
@@ -2679,9 +2681,57 @@ export default {
|
|
|
});
|
|
|
this.hasStart = false;
|
|
|
this.postStudyRecord(1);
|
|
|
+ this.nextSection()
|
|
|
// uni.$emit('playNext') //播放重修下一节
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
+ //播放下一节
|
|
|
+ async nextSection(){
|
|
|
+ console.log("放完了",this.menuAllList)
|
|
|
+ if(!this.menuAllList.length){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log('this.sectionId:', this.sectionId, 'this.chapterId:', this.chapterId, 'this.moduleId:', this.moduleId);
|
|
|
+ //第一个弹窗
|
|
|
+ this.curPlayIndex = this.menuAllList.findIndex((item) => {
|
|
|
+ let i_sectionId = item.sectionId || 0
|
|
|
+ let i_chapterId = item.chapterId || 0
|
|
|
+ let i_moduleId = item.moduleId || 0
|
|
|
+ return i_sectionId == this.playSectionId && i_chapterId == this.chapterId && i_moduleId == this.moduleId
|
|
|
+ })
|
|
|
+ console.log('查找到的curItem:', this.curPlayIndex);
|
|
|
+ let data = this.menuAllList[this.curPlayIndex+1];
|
|
|
+ if (!data) {
|
|
|
+ //第二个弹窗
|
|
|
+ }
|
|
|
+ console.log("放下一个", data)
|
|
|
+ this.moduleId = data.moduleId
|
|
|
+ this.chapterId = data.chapterId
|
|
|
+ this.sectionId = data.sectionId
|
|
|
+ if(data.sectionType == 1) { //录播
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: data.sectionId })
|
|
|
+ this.$store.commit("setPlayVID", { playVID: data.recordingUrl })
|
|
|
+
|
|
|
+ this.sectionItem = data;
|
|
|
+ await this.getPhotoLastRecord() // 获取拍照历史
|
|
|
+ this.playVideo(data)
|
|
|
+ } else if(data.sectionType == 2) { //直播
|
|
|
+ this.studyRecordGetLastLive();
|
|
|
+ } else if(data.sectionType == 3) { //回放
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: data.sectionId })
|
|
|
+ this.$store.commit("setPlayVID", { playVID: data.recordingUrl })
|
|
|
+ this.sectionItem = data
|
|
|
+ this.playVideo(data)
|
|
|
+ }
|
|
|
+ let playNextId = `moduleId${data.moduleId}chapterId${data.chapterId}sectionId${data.sectionId}`;
|
|
|
+ this.$store.commit("updatePlayNextId", playNextId);
|
|
|
+ // this.updateChapterOpen(true)
|
|
|
+ // this.$emit('openModuleTwo', data)\
|
|
|
+ data.id = data.moduleId
|
|
|
+ uni.$emit('openEmit', data)
|
|
|
+ },
|
|
|
+
|
|
|
//拍照
|
|
|
openPhoto() {
|
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
@@ -2966,7 +3016,7 @@ export default {
|
|
|
let playNextId = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}`;
|
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
self.list = [
|
|
|
{
|
|
|
name: "目录",
|
|
@@ -2987,7 +3037,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMenuList() {
|
|
|
- // console.log('menuList的目录', this.sectionItem);
|
|
|
+ // console.log('menuList的目录');
|
|
|
let self = this;
|
|
|
// /course/menuList 查询课程目录结构列表
|
|
|
this.$api
|