|
@@ -12,6 +12,7 @@
|
|
|
<view v-for="(itemM, indexM) in list" :key="indexM">
|
|
|
<view v-if="itemM.type != 2">
|
|
|
<courseSection
|
|
|
+ ref="ChapterSection"
|
|
|
:isLive="isLive"
|
|
|
:orderGoodsId="orderGoodsId"
|
|
|
:sectionMaxNum="sectionMaxNum"
|
|
@@ -26,6 +27,9 @@
|
|
|
:gradeId="gradeId"
|
|
|
:menuItem="itemM"
|
|
|
:levelId="levelId + '-' + itemM.sectionId"
|
|
|
+ :testType="2"
|
|
|
+ :sectionExam='sectionExam'
|
|
|
+ @togoBack='togoBack()'
|
|
|
></courseSection>
|
|
|
<u-line v-if="indexM < list.length - 1"></u-line>
|
|
|
</view>
|
|
@@ -141,6 +145,7 @@ export default {
|
|
|
list: [],
|
|
|
examList: {},
|
|
|
canLearn: false, //是否全部视频看完才可以练习、测试
|
|
|
+ sectionExam: [],
|
|
|
};
|
|
|
},
|
|
|
onLoad() {},
|
|
@@ -158,6 +163,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["updateChapterOpen"]),
|
|
|
+ togoBack(value) {
|
|
|
+ console.log('章的节', value , this.$refs.ChapterSection)
|
|
|
+ this.$refs.ChapterSection[0].ChapterExam()
|
|
|
+ },
|
|
|
goodsTodayStudySectionNum() {
|
|
|
return new Promise((resolve) => {
|
|
|
this.$api
|
|
@@ -491,11 +500,22 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- openChapter(item) {
|
|
|
+ async openChapter(item) {
|
|
|
console.log('---zhang',this.menuItem, this.down,this.list, item.id, item.courseId, item.moduleId);
|
|
|
this.down = !this.down;
|
|
|
if (!this.down && this.list.length == 0) {
|
|
|
console.log(item.id, 69);
|
|
|
+ //获取所有节试卷列表
|
|
|
+ await this.$api.reSectionExamList({
|
|
|
+ chapterId: item.chapterId || item.menuId,
|
|
|
+ courseId: item.courseId,
|
|
|
+ gradeId: item.gradeId
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.sectionExam = res.data.data || []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
if (this.isBuy) {
|
|
|
let moduleId = item.moduleId ? item.moduleId : 0;
|
|
|
if (this.isRebuild) {
|
|
@@ -509,6 +529,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
getMenuExamList(chapterId, courseId, moduleId) {
|
|
|
let self = this;
|
|
|
this.$api
|
|
@@ -632,7 +653,6 @@ export default {
|
|
|
});
|
|
|
self.list = res.data.data;
|
|
|
console.log('=============1', self.list)
|
|
|
- this.$emit('sectionList', self.list)
|
|
|
}
|
|
|
});
|
|
|
},
|