|
@@ -172,7 +172,6 @@
|
|
:levelId="'0-' + item.menuId"
|
|
:levelId="'0-' + item.menuId"
|
|
:goodsType='1'
|
|
:goodsType='1'
|
|
:menuAllList="menuAllList"
|
|
:menuAllList="menuAllList"
|
|
- :sectionItem="sectionItem"
|
|
|
|
></courseChapter
|
|
></courseChapter
|
|
></view>
|
|
></view>
|
|
<!--节 -->
|
|
<!--节 -->
|
|
@@ -354,7 +353,6 @@
|
|
:levelId="'0-' + item.menuId"
|
|
:levelId="'0-' + item.menuId"
|
|
:goodsType='1'
|
|
:goodsType='1'
|
|
:menuAllList="menuAllList"
|
|
:menuAllList="menuAllList"
|
|
- :sectionItem="sectionItem"
|
|
|
|
></courseChapter>
|
|
></courseChapter>
|
|
</view>
|
|
</view>
|
|
<!--节 -->
|
|
<!--节 -->
|
|
@@ -2891,7 +2889,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getReMenuList() {
|
|
getReMenuList() {
|
|
- console.log('重修的目录');
|
|
|
|
|
|
+ // console.log('重修的目录');
|
|
let self = this;
|
|
let self = this;
|
|
this.$api
|
|
this.$api
|
|
.reMenuList({
|
|
.reMenuList({
|
|
@@ -2909,7 +2907,6 @@ export default {
|
|
item.name = item.menuName;
|
|
item.name = item.menuName;
|
|
}
|
|
}
|
|
self.reMenuList = res.data.rows;
|
|
self.reMenuList = res.data.rows;
|
|
- console.log('reMenuList:' , this.reMenuList, 'this.sectionItem:', this.sectionItem);
|
|
|
|
if (self.reMenuList.length > 0) {
|
|
if (self.reMenuList.length > 0) {
|
|
this.showNotes = false;
|
|
this.showNotes = false;
|
|
self.list = [
|
|
self.list = [
|
|
@@ -2936,7 +2933,6 @@ export default {
|
|
if (Object.keys(this.sectionItem).length) {
|
|
if (Object.keys(this.sectionItem).length) {
|
|
let playNextId = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}`;
|
|
let playNextId = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}`;
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
- console.log('拼接playNextId:', playNextId);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
self.list = [
|
|
self.list = [
|
|
@@ -2959,7 +2955,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getMenuList() {
|
|
getMenuList() {
|
|
- console.log('menuList的目录', this.sectionItem);
|
|
|
|
|
|
+ // console.log('menuList的目录', this.sectionItem);
|
|
let self = this;
|
|
let self = this;
|
|
// /course/menuList 查询课程目录结构列表
|
|
// /course/menuList 查询课程目录结构列表
|
|
this.$api
|
|
this.$api
|
|
@@ -2976,16 +2972,30 @@ export default {
|
|
self.menuList = res.data.rows;
|
|
self.menuList = res.data.rows;
|
|
this.reStart = true
|
|
this.reStart = true
|
|
for (let i = 0; i < res.data.rows.length; i++) {
|
|
for (let i = 0; i < res.data.rows.length; i++) {
|
|
- // && res.data.rows[i].menuId == this.sectionItem.moduleId
|
|
|
|
if (res.data.rows[i].type == 1) {
|
|
if (res.data.rows[i].type == 1) {
|
|
|
|
+ // 模块
|
|
|
|
+ if (Object.keys(this.sectionItem).length) {
|
|
|
|
+ if (res.data.rows[i].menuId == this.sectionItem.moduleId) {
|
|
|
|
+ this.menuIndex = [i];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
this.menuIndex = [i];
|
|
this.menuIndex = [i];
|
|
break;
|
|
break;
|
|
|
|
+ }
|
|
|
|
+
|
|
} else if (res.data.rows[i].type == 2) {
|
|
} else if (res.data.rows[i].type == 2) {
|
|
- // &&
|
|
|
|
- // res.data.rows[i].menuId == this.sectionItem.chapterId &&
|
|
|
|
- // (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)
|
|
|
|
|
|
+ // 章
|
|
|
|
+ if (Object.keys(this.sectionItem).length) {
|
|
|
|
+ if (res.data.rows[i].menuId == this.sectionItem.chapterId && (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)) {
|
|
|
|
+ this.menuIndex = [i];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
this.menuIndex = [i];
|
|
this.menuIndex = [i];
|
|
break;
|
|
break;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
|
|
console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
|