|
@@ -88,94 +88,20 @@
|
|
|
<view class="note">正在直播中</view>
|
|
|
<view class="title">{{ livingItem.sectionName }}</view>
|
|
|
</view>
|
|
|
- <!-- <view
|
|
|
- v-if="teacherList && teacherList.length > 0"
|
|
|
- class="teacher_names"
|
|
|
- >
|
|
|
- <view
|
|
|
- v-for="(tea, index) in teacherList"
|
|
|
- :key="index"
|
|
|
- class="names"
|
|
|
- :class="{ nactive: teacherIndex == index }"
|
|
|
- @click="activeFunc(tea, index)"
|
|
|
- >
|
|
|
- {{ tea.aliasName }}
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <view
|
|
|
- class="menuBox onessss"
|
|
|
- v-for="(item, index) in menuList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <template v-if="!$method.isEmptyObject(sectionItem)">
|
|
|
- <!--模块 -->
|
|
|
- <view v-if="item.type == 1"
|
|
|
- ><courseModule
|
|
|
- v-if="reStart"
|
|
|
- :orderGoodsId="orderGoodsId"
|
|
|
- :sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
- :needOpen="sectionItem.moduleId == item.menuId"
|
|
|
- :courseId="courseId"
|
|
|
- :preItem="menuList[index - 1]"
|
|
|
- :learningOrder="orderNum"
|
|
|
- :goodsId="goodsId"
|
|
|
- :gradeId="gradeId"
|
|
|
- :isBuy="true"
|
|
|
- :menuItem="item"
|
|
|
- :levelId="item.menuId"
|
|
|
- :goodsType="1"
|
|
|
- :menuAllList="menuAllList"
|
|
|
- :sectionItem="sectionItem"
|
|
|
- ></courseModule
|
|
|
- ></view>
|
|
|
- <!--章 -->
|
|
|
- <view v-if="item.type == 2"
|
|
|
- ><courseChapter
|
|
|
- v-if="reStart"
|
|
|
- :orderGoodsId="orderGoodsId"
|
|
|
- :sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
- :needOpen="
|
|
|
- !sectionItem.moduleId &&
|
|
|
- sectionItem.chapterId == item.menuId
|
|
|
- "
|
|
|
- :courseId="courseId"
|
|
|
- :preItem="menuList[index - 1]"
|
|
|
- @playEnd="sectionPlayEnd($event, index)"
|
|
|
- :learningOrder="orderNum"
|
|
|
- :goodsId="goodsId"
|
|
|
- :gradeId="gradeId"
|
|
|
- :isBuy="true"
|
|
|
- :menuItem="item"
|
|
|
- :levelId="'0-' + item.menuId"
|
|
|
- :goodsType="1"
|
|
|
- :menuAllList="menuAllList"
|
|
|
- :sectionItem="sectionItem"
|
|
|
- ></courseChapter
|
|
|
- ></view>
|
|
|
- <!--节 -->
|
|
|
- <view v-if="item.type == 3"
|
|
|
- ><courseSection
|
|
|
- ref="MoudleSection"
|
|
|
- v-if="reStart"
|
|
|
- :orderGoodsId="orderGoodsId"
|
|
|
- :sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
- @playEnd="sectionPlayEnd($event, index)"
|
|
|
- :courseId="courseId"
|
|
|
- :preItem="menuList[index - 1]"
|
|
|
- :learningOrder="orderNum"
|
|
|
- :goodsId="goodsId"
|
|
|
- :gradeId="gradeId"
|
|
|
- :isBuy="true"
|
|
|
- :menuItem="item"
|
|
|
- :levelId="'0-0-' + item.menuId"
|
|
|
- :goodsType="1"
|
|
|
- :testType="3"
|
|
|
- :menuAllList="menuAllList"
|
|
|
- ></courseSection
|
|
|
- ></view>
|
|
|
- </template>
|
|
|
- <!-- @togoBack="togoBack($event)" -->
|
|
|
- </view>
|
|
|
+ <course-tree
|
|
|
+ v-if="sectionItem.id || sectionItem.sectionId"
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
+ :sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
+ :courseId="courseId"
|
|
|
+ :learningOrder="orderNum"
|
|
|
+ :goodsId="goodsId"
|
|
|
+ :gradeId="gradeId"
|
|
|
+ :isRebuild="false"
|
|
|
+ :isBuy="true"
|
|
|
+ :goodsType="1"
|
|
|
+ :menuAllList="menuAllList"
|
|
|
+ :sectionItem="sectionItem"
|
|
|
+ ></course-tree>
|
|
|
</view>
|
|
|
<!--讲义 -->
|
|
|
<view v-show="current == 1">
|
|
@@ -575,11 +501,12 @@ import courseModule from "@/components/course/courseModule.vue";
|
|
|
import courseChapter from "@/components/course/courseChapter.vue";
|
|
|
import courseSection from "@/components/course/courseSection.vue";
|
|
|
import handoutsBox from "@/components/course/handoutsBox.vue";
|
|
|
+import courseTree from "@/components/course/courseTree.vue";
|
|
|
import PopupPhoto from "@/components/popup/index.vue";
|
|
|
import myCompressImage from "@/common/compressPhoto.js";
|
|
|
-import myPlayer from "../../components/myPlayer/polyvPlayer.vue";
|
|
|
-import noteBox from "../../components/course/noteBox.vue";
|
|
|
-import answerBox from "../../components/course/answerBox.vue";
|
|
|
+import myPlayer from "@/components/myPlayer/polyvPlayer.vue";
|
|
|
+import noteBox from "@/components/course/noteBox.vue";
|
|
|
+import answerBox from "@/components/course/answerBox.vue";
|
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
|
import { lockAction } from "../../utils/lock";
|
|
|
export default {
|
|
@@ -592,6 +519,7 @@ export default {
|
|
|
myPlayer,
|
|
|
noteBox,
|
|
|
answerBox,
|
|
|
+ courseTree,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -650,7 +578,6 @@ export default {
|
|
|
option: null,
|
|
|
toggleCourseShow: false, // 切换课程弹窗
|
|
|
courseList: [], // 课程列表
|
|
|
- reStart: false, // 是否显示模块/章/节
|
|
|
subList: [],
|
|
|
subIndex: 0,
|
|
|
goodsTeacher: [],
|
|
@@ -721,7 +648,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
detail() {
|
|
|
- if (!this.courseId) {
|
|
|
+ if (!this.courseId || !this.courseList.length) {
|
|
|
return {};
|
|
|
}
|
|
|
return this.courseList.find((e) => e.courseId == this.courseId);
|
|
@@ -833,7 +760,6 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.courseList = res.data.rows;
|
|
|
- console.log(this.courseList, "课程列表");
|
|
|
// 科目
|
|
|
let allItem = [{ subjectId: 0, subjectName: "所有" }];
|
|
|
let ids = [];
|
|
@@ -988,7 +914,6 @@ export default {
|
|
|
},
|
|
|
// 原来onshow里面的内容
|
|
|
async originOnShow() {
|
|
|
- this.getMenuList();
|
|
|
this.getReMenuList();
|
|
|
await this.studyRecordMenuAllList();
|
|
|
// 消息过来 定位某个节
|
|
@@ -1136,15 +1061,18 @@ export default {
|
|
|
this.toggleCourseShow = false;
|
|
|
return;
|
|
|
}
|
|
|
- if (this.orderNum == 2&&index!=0){
|
|
|
- let prevItem = this.courseList[index - 1];
|
|
|
- if (prevItem.stuAllNum + prevItem.recordNum < prevItem.secAllNum + prevItem.examNum) {
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- title: "请按顺序学完上一课再学习这一课",
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
+ if (this.orderNum == 2 && index != 0) {
|
|
|
+ let prevItem = this.courseList[index - 1];
|
|
|
+ if (
|
|
|
+ prevItem.stuAllNum + prevItem.recordNum <
|
|
|
+ prevItem.secAllNum + prevItem.examNum
|
|
|
+ ) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: "请按顺序学完上一课再学习这一课",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
if (type) {
|
|
|
this.teacherIndex = 0;
|
|
@@ -1154,17 +1082,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ this.sectionItem = {};
|
|
|
this.toggleCourseShow = false;
|
|
|
- this.courseId = item.courseId
|
|
|
- this.originOnShow()
|
|
|
+ this.courseId = item.courseId;
|
|
|
+ this.originOnShow();
|
|
|
},
|
|
|
async nextCourses(item, type) {
|
|
|
this.vid = "";
|
|
|
this.hasStart = true;
|
|
|
await this.originUnload();
|
|
|
-
|
|
|
-
|
|
|
- this.reStart = false;
|
|
|
this.courseId = item.courseId;
|
|
|
this.gradeId = item.gradeId;
|
|
|
this.toggleCourseShow = false;
|
|
@@ -1808,6 +1734,7 @@ export default {
|
|
|
//正常播放视频
|
|
|
async playVideo(item) {
|
|
|
this.sectionItem = item;
|
|
|
+ console.log(this.sectionItem, "this.sectionItem");
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
@@ -2278,8 +2205,6 @@ export default {
|
|
|
let playNextId = `moduleId${data.moduleId}chapterId${data.chapterId}sectionId${data.sectionId}`;
|
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
|
this.updateChapterOpen(true);
|
|
|
- this.reStart = false;
|
|
|
- this.getMenuList();
|
|
|
}
|
|
|
},
|
|
|
});
|
|
@@ -2636,28 +2561,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getMenuList() {
|
|
|
- this.$api
|
|
|
- .reMenuList({
|
|
|
- courseId: this.courseId,
|
|
|
- gradeId: this.gradeId,
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- for (let i = 0; i < res.data.rows.length; i++) {
|
|
|
- let item = res.data.rows[i];
|
|
|
- item.down = true;
|
|
|
- item.id = item.menuId;
|
|
|
- item.name = item.menuName;
|
|
|
- item.menuType = item.type;
|
|
|
- }
|
|
|
- this.menuList = res.data.rows;
|
|
|
- console.log(this.menuList,789)
|
|
|
- this.reStart = true;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
courseDetail() {
|
|
|
this.$api.courseDetail(this.courseId).then((res) => {
|
|
|
if (res.data.code == 200) {
|