|
@@ -178,67 +178,69 @@
|
|
|
v-for="(item, index) in menuList"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <!--模块 -->
|
|
|
- <view v-if="item.type == 1"
|
|
|
- ><courseModule
|
|
|
- v-if="reStart"
|
|
|
- :orderGoodsId="orderGoodsId"
|
|
|
- :sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
- :needOpen="menuIndex[0] === index ? true : false"
|
|
|
- :courseId="courseId"
|
|
|
- :preItem="menuList[index - 1]"
|
|
|
- :learningOrder="businessData.goodsLearningOrder"
|
|
|
- :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="menuIndex[0] === index ? true : false"
|
|
|
- :courseId="courseId"
|
|
|
- :preItem="menuList[index - 1]"
|
|
|
- @playEnd="sectionPlayEnd($event, index)"
|
|
|
- :learningOrder="businessData.goodsLearningOrder"
|
|
|
- :goodsId="goodsId"
|
|
|
- :gradeId="gradeId"
|
|
|
- :isBuy="true"
|
|
|
- :menuItem="item"
|
|
|
- :levelId="'0-' + item.menuId"
|
|
|
- :goodsType="1"
|
|
|
- :menuAllList="menuAllList"
|
|
|
- ></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="businessData.goodsLearningOrder"
|
|
|
- :goodsId="goodsId"
|
|
|
- :gradeId="gradeId"
|
|
|
- :isBuy="true"
|
|
|
- :menuItem="item"
|
|
|
- :levelId="'0-0-' + item.menuId"
|
|
|
- :goodsType="1"
|
|
|
- :testType="3"
|
|
|
- :menuAllList="menuAllList"
|
|
|
- ></courseSection
|
|
|
- ></view>
|
|
|
+ <template v-if="sectionItem.sectionId || sectionItem.id">
|
|
|
+ <!--模块 -->
|
|
|
+ <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="businessData.goodsLearningOrder"
|
|
|
+ :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&§ionItem.chapterId == item.menuId"
|
|
|
+ :courseId="courseId"
|
|
|
+ :preItem="menuList[index - 1]"
|
|
|
+ @playEnd="sectionPlayEnd($event, index)"
|
|
|
+ :learningOrder="businessData.goodsLearningOrder"
|
|
|
+ :goodsId="goodsId"
|
|
|
+ :gradeId="gradeId"
|
|
|
+ :isBuy="true"
|
|
|
+ :menuItem="item"
|
|
|
+ :levelId="'0-' + item.menuId"
|
|
|
+ :goodsType="1"
|
|
|
+ :menuAllList="menuAllList"
|
|
|
+ ></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="businessData.goodsLearningOrder"
|
|
|
+ :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>
|
|
|
</view>
|
|
@@ -1651,8 +1653,7 @@ export default {
|
|
|
} else if (sectionItem.doType == 2) {
|
|
|
uni.showModal({
|
|
|
title: "温馨提示",
|
|
|
- content: "当前节视频已学完,即将进入考试?",
|
|
|
- showCancel: false,
|
|
|
+ content: "当前节视频已学完,是否进入考试?",
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
this.toQuestionBank(sectionItem);
|
|
@@ -1700,14 +1701,15 @@ export default {
|
|
|
if (!data.sectionId) {
|
|
|
data = this.menuAllList[0];
|
|
|
} else {
|
|
|
- if (
|
|
|
- data.learning == 1 &&
|
|
|
- this.businessData.goodsLearningOrder == 2
|
|
|
- ) {
|
|
|
- let next = this.menuAllList.find((e) => e.studyStatus != 1);
|
|
|
- next && (data = next);
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // data.learning == 1 &&
|
|
|
+ // this.businessData.goodsLearningOrder == 2
|
|
|
+ // ) {
|
|
|
+ // let next = this.menuAllList.find((e) => e.studyStatus != 1);
|
|
|
+ // next && (data = next);
|
|
|
+ // }
|
|
|
}
|
|
|
+ console.log(data,789)
|
|
|
this.initPlayVideo(data);
|
|
|
// if (res.data.data) {
|
|
|
// this.moduleId = res.data.data.moduleId;
|
|
@@ -3315,6 +3317,14 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
if (data.doType == 2) {
|
|
|
+ if (data.studyStatus == 1) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "试卷已合格!",
|
|
|
+ duration: 2000,
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
title: "温馨提示",
|
|
|
content: "当前节视频已学完,是否进入考试?",
|