|
@@ -136,6 +136,10 @@ export default {
|
|
testType: {
|
|
testType: {
|
|
type: Number,
|
|
type: Number,
|
|
default: 0,
|
|
default: 0,
|
|
|
|
+ },
|
|
|
|
+ menuAllList: { // 课程所有子目录结构列表
|
|
|
|
+ type: Array,
|
|
|
|
+ default: () => []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
@@ -152,11 +156,13 @@ export default {
|
|
moduleSectionExam: [], // 模块下的所有节试卷列表
|
|
moduleSectionExam: [], // 模块下的所有节试卷列表
|
|
chapterExams: {},
|
|
chapterExams: {},
|
|
moduleExams: {},
|
|
moduleExams: {},
|
|
|
|
+ newMenuAllList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.newMenuAllList = this.menuAllList
|
|
if (this.testType == 3) {
|
|
if (this.testType == 3) {
|
|
// 模块下的所有节试卷列表
|
|
// 模块下的所有节试卷列表
|
|
this.$api.reSectionExamList({
|
|
this.$api.reSectionExamList({
|
|
@@ -170,8 +176,8 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
- console.log('节的播放---');
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ // console.log('节的播放---', this.menuAllList)
|
|
this.nowTime = Number(new Date().getTime()/1000).toFixed(0)
|
|
this.nowTime = Number(new Date().getTime()/1000).toFixed(0)
|
|
this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
|
|
this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
|
|
let moduleId = this.menuItem.moduleId || 0;
|
|
let moduleId = this.menuItem.moduleId || 0;
|
|
@@ -180,10 +186,10 @@ export default {
|
|
let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
|
|
let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
|
|
this.playId = playNextId;
|
|
this.playId = playNextId;
|
|
uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
|
|
uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
|
|
- uni.$once('playNext'+playNextId, (data) => {
|
|
|
|
|
|
+ uni.$once('playNext'+playNextId, async (data) => {
|
|
//到时会触发每个节的监听事件,只允许当前节的接收
|
|
//到时会触发每个节的监听事件,只允许当前节的接收
|
|
let self = this
|
|
let self = this
|
|
-
|
|
|
|
|
|
+ console.log('playNext====');
|
|
if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){ // fromRebuild 来自重修目录的点击才弹出播放下一节
|
|
if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){ // fromRebuild 来自重修目录的点击才弹出播放下一节
|
|
//重修存在下一节
|
|
//重修存在下一节
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -213,7 +219,9 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log('playEnd----');
|
|
this.$emit('playEnd',{isRebuild:this.isRebuild})
|
|
this.$emit('playEnd',{isRebuild:this.isRebuild})
|
|
|
|
+ this.newMenuAllList = await this.studyRecordMenuAllList()
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -298,8 +306,8 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- async getVideo(){
|
|
|
|
- console.log('点击节', this.preItem, this.menuItem);
|
|
|
|
|
|
+ getVideo(){
|
|
|
|
+ console.log('点击节', this.newMenuAllList);
|
|
if(this.clickLock) {
|
|
if(this.clickLock) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -308,7 +316,8 @@ export default {
|
|
|
|
|
|
if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
|
|
if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
|
|
if(this.preItem) {
|
|
if(this.preItem) {
|
|
- let rows = await this.studyRecordMenuAllList();
|
|
|
|
|
|
+ // let rows = await this.studyRecordMenuAllList();
|
|
|
|
+ let rows = this.newMenuAllList
|
|
let newRows = [];
|
|
let newRows = [];
|
|
for(let i = 0; i < rows.length; i++ ) {
|
|
for(let i = 0; i < rows.length; i++ ) {
|
|
let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
|
|
let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
|