浏览代码

Merge branch 'xqy_shijuan' into dev

xuqiaoying 3 年之前
父节点
当前提交
4df4ebde5e

+ 7 - 0
common/httpList/course.js

@@ -208,4 +208,11 @@ export default {
 			data:data
 		})
 	},
+	reSectionExamList(data) {
+		return myRequest({
+			url: '/course/sectionExamList',
+			method: 'get',
+			data: data
+		})
+	},
 }

+ 45 - 28
components/course/courseChapter.vue

@@ -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"
+            :ChapterSectionExam='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) {
+      this.$refs.ChapterSection[0].ChapterExam()
+    },
     goodsTodayStudySectionNum() {
       return new Promise((resolve) => {
         this.$api
@@ -173,7 +182,6 @@ export default {
       });
     },
     refreshList(isRebuild) {
-      console.log(9999);
       let moduleId = this.menuItem.moduleId ? this.menuItem.moduleId : 0;
       if (this.isRebuild) {
         this.getReSectionList(
@@ -191,7 +199,6 @@ export default {
       }
 
       this.$emit("playEnd", { isRebuild: isRebuild.isRebuild });
-      console.log(10000);
       // let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
       // this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
     },
@@ -269,14 +276,14 @@ export default {
           return;
         }
       }
-      console.log(this.learningOrder, "this.learningOrder");
+      // console.log(this.learningOrder, "this.learningOrder");
       if (this.learningOrder == 1) {
         if (this.canLearn) {
           let num = await this.bankRecordDoNum(item.typeId);
           //有次数限制
           if (item.answerNum - num > 0 && item.answerNum > 0) {
             // this.$set(this.list[index],'doNum',(item.doNum+1))
-            console.log(this.list[index]);
+            // console.log(this.list[index]);
             uni.navigateTo({
               url:
                 "/pages2/class/questionBank?courseId=" +
@@ -292,7 +299,9 @@ export default {
                 "&chapterId=" +
                 chapterId +
                 "&orderGoodsId=" +
-                this.orderGoodsId,
+                this.orderGoodsId +
+				        "&types=1"
+                ,
             });
             this.studyLog()
             //没有答题次数限制
@@ -312,7 +321,8 @@ export default {
                 "&chapterId=" +
                 chapterId +
                 "&orderGoodsId=" +
-                this.orderGoodsId,
+                this.orderGoodsId +
+				        "&types=1",
             });
             this.studyLog()
           } else {
@@ -354,7 +364,7 @@ export default {
             }
           }
         }
-        console.log(newRows);
+        // console.log(newRows);
         let isAllLearn = newRows.every((item) => {
           return item.studyStatus == 1;
         });
@@ -368,7 +378,7 @@ export default {
           //有次数限制
           if (item.answerNum - num > 0 && item.answerNum > 0) {
             // this.$set(this.list[index],'doNum',(item.doNum+1))
-            console.log(this.list[index]);
+            // console.log(this.list[index]);
             uni.navigateTo({
               url:
                 "/pages2/class/questionBank?courseId=" +
@@ -384,7 +394,8 @@ export default {
                 "&chapterId=" +
                 chapterId +
                 "&orderGoodsId=" +
-                this.orderGoodsId,
+                this.orderGoodsId +
+				        "&types=1",
             });
             this.studyLog()
             //没有答题次数限制
@@ -404,7 +415,8 @@ export default {
                 "&chapterId=" +
                 chapterId +
                 "&orderGoodsId=" +
-                this.orderGoodsId,
+                this.orderGoodsId +
+				        "&types=1",
             });
             this.studyLog()
           } else {
@@ -426,7 +438,7 @@ export default {
         //有次数限制
         if (item.answerNum - item.doNum > 0 && item.answerNum > 0) {
           // this.$set(this.list[index],'doNum',(item.doNum+1))
-          console.log(this.list[index]);
+          // console.log(this.list[index]);
           uni.navigateTo({
             url:
               "/pages2/class/questionBank?courseId=" +
@@ -442,7 +454,8 @@ export default {
               "&chapterId=" +
               chapterId +
               "&orderGoodsId=" +
-              this.orderGoodsId,
+              this.orderGoodsId +
+              "&types=1",
           });
           this.studyLog()
           //没有答题次数限制
@@ -462,7 +475,8 @@ export default {
               "&chapterId=" +
               chapterId +
               "&orderGoodsId=" +
-              this.orderGoodsId,
+              this.orderGoodsId +
+              "&types=1",
           });
           this.studyLog()
         } else {
@@ -491,11 +505,22 @@ export default {
           });
       });
     },
-    openChapter(item) {
-      console.log('---zhang',this.menuItem, this.down,this.list, item.id, item.courseId, item.moduleId);
+    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);
+        // 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 +534,7 @@ export default {
         }
       }
     },
+
     getMenuExamList(chapterId, courseId, moduleId) {
       let self = this;
       this.$api
@@ -524,7 +550,6 @@ export default {
         });
     },
     getSectionList(chapterId) {
-      console.log('=============2', 'chapterId:', chapterId)
       let self = this;
     //   url: '/app/common/course/sectionList/'+data,
       this.$api.sectionList(chapterId).then((res) => {
@@ -541,11 +566,9 @@ export default {
           }
 
           let newArr = res.data.data.filter((item) => {
-            console.log(item);
             return item.type != 2;
           });
           this.canLearn = newArr.every((item) => {
-            console.log(item);
             if (item.learning == 1) {
               return true;
             } else {
@@ -553,12 +576,12 @@ export default {
             }
           });
           self.list = res.data.data;
-          console.log('=============2', self.list)
+          // console.log('=============2', self.list)
         }
       });
     },
     getReSectionList(chapterId, courseId, moduleId) {
-      console.log('=============3', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
+      // console.log('=============3', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
       let self = this;
       this.$api
         .reSectionList({
@@ -581,11 +604,9 @@ export default {
               }
             }
             let newArr = res.data.data.filter((item) => {
-              console.log(item);
               return item.type != 2;
             });
             this.canLearn = newArr.every((item) => {
-              console.log(item);
               if (item.learning == 1) {
                 return true;
               } else {
@@ -593,12 +614,11 @@ export default {
               }
             });
             self.list = res.data.data;
-            console.log('=============3', self.list)
           }
         });
     },
     getBuySectionList(chapterId, courseId, moduleId) {
-      console.log('=============1', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
+      // console.log('=============1', 'chapterId:', chapterId, 'courseId:', courseId, 'moduleId:', moduleId)
       let self = this;
       this.$api
         .reSectionList({
@@ -623,7 +643,6 @@ export default {
               return item.type != 2;
             });
             this.canLearn = newArr.every((item) => {
-              console.log(item);
               if (item.learning == 1) {
                 return true;
               } else {
@@ -631,8 +650,6 @@ export default {
               }
             });
             self.list = res.data.data;
-            console.log('=============1', self.list)
-            this.$emit('sectionList', self.list)
           }
         });
     },

+ 116 - 4
components/course/courseModule.vue

@@ -12,9 +12,50 @@
 		</view>
 		<view v-show="!down">
 			<view v-for="(itemM,indexM) in list" :key="indexM">
-				<courseChapter v-if='itemM.type != 2' :orderGoodsId="orderGoodsId"
-						:isLive="isLive" :preItem="list[indexM - 1] || preItem" :sectionMaxNum="sectionMaxNum" :needOpen="needOpen" @playEnd="playEnd($event)" @toDo="toDo($event)" :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
+				<!-- v-if='itemM.type != 2' -->
+				<courseChapter v-if='itemM.type != 2'  :orderGoodsId="orderGoodsId"
+						:isLive="isLive" :preItem="list[indexM - 1] || preItem" :sectionMaxNum="sectionMaxNum" :needOpen="needOpen" @playEnd="playEnd($event)" 
+						@toDo="toDo($event)" :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" 
+						:isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId">
+				</courseChapter>
 				<u-line v-if="indexM<list.length-1"></u-line>
+				<view v-if="itemM.type == 2">
+					<view
+						class="examBox"
+						@click="
+						toDoModuleExam(
+							itemM.typeId,
+							goodsId,
+							itemM.moduleId,
+							itemM.chapterId,
+							itemM,
+							indexM
+						)
+						"
+					>
+						<view class="exam">
+						<view class="eTag">{{
+							itemM.doType == 1 ? "练习" : "考试"
+						}}</view>
+						<view style="margin-left: 15rpx; flex: 1">{{ itemM.name }}</view>
+						</view>
+						
+						<view>
+							<view
+								:class="{
+								tagGreen: itemM.learning == 1,
+								tagRe: itemM.learning == 0 || itemM.rebuild > 0,
+								}"
+							>
+							
+								<text v-if="itemM.learning == 1">合格</text>
+								<text v-else>不合格</text>
+							</view>
+						</view>
+					</view>
+					</view>
+				
+
 			</view>
 		</view>
 	</view>
@@ -71,7 +112,12 @@ export default {
 		},
 		sectionMaxNum:{
 			default:undefined
-		}
+		},
+		// 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播	
+		goodsType: {
+			type: [Number, String],
+			default: 0,
+		}, 
 	},
 	components: {
 		courseChapter
@@ -153,7 +199,32 @@ export default {
 				}
 			});
 		},
-	},computed: { ...mapGetters(['chapterOpen']) },
+		/**
+		 * 去做题
+		 */
+		async toDoModuleExam(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
+			uni.navigateTo({
+			url:
+				"/pages2/class/questionBank?courseId=" +
+				this.courseId +
+				"&gradeId=" +
+				this.gradeId +
+				"&isFromVideo=1&id=" +
+				id +
+				"&goodsid=" +
+				goodsId +
+				"&moduleId=" +
+				moduleId +
+				"&chapterId=" +
+				chapterId +
+				"&orderGoodsId=" +
+				this.orderGoodsId +
+				"&types=3",
+			})
+		},
+		
+	},
+	computed: { ...mapGetters(['chapterOpen']) },
 };
 </script>
 
@@ -180,4 +251,45 @@ export default {
 		height: 24rpx;
 	}
 }
+
+.examBox {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  .exam {
+		font-size: 30rpx;
+		display: flex;
+		align-items: center;
+		margin: 20rpx 0;
+	}
+	.eTag {
+		width: 56rpx;
+		height: 42rpx;
+		text-align: center;
+		line-height: 42rpx;
+		font-size: 20rpx;
+		background: #007aff;
+		border-radius: 8rpx;
+		color: #ffffff;
+	}
+}
+.tagRe {
+  width: 80rpx;
+  height: 28rpx;
+  background: #ff3b30;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+.tagGreen {
+  width: 80rpx;
+  height: 28rpx;
+  background: #34c759;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+
 </style>

+ 114 - 5
components/course/courseSection.vue

@@ -62,6 +62,8 @@
 					<view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
 				</view>
 			</template>
+
+			<view v-if="checkTest()" class="exercises" @click.stop="toDoSectionExam()">习题</view>
 			
 			
 		</view>
@@ -75,6 +77,7 @@
 import { mapGetters } from 'vuex';
 import eventHub from '@/common/eventHub.js'
 import {WEBVIEW_URL} from '@/common/request.js'
+import { some } from '../../pages3/static/polyv-sdk/common/chat/emotionList';
 export default {
 	name: 'courseSection',
 	props: {
@@ -124,6 +127,16 @@ export default {
 		sectionMaxNum:{
 			default:undefined,
 		},
+		// 章->所有节试卷列表
+		ChapterSectionExam: {
+			type: Array,
+			default: () => [],
+		},
+		// 区分是模块试卷还是章试卷,3是模块试卷
+		testType: {
+			type: Number,
+			default: 0,
+		}
 	},
 	watch:{
 		menuItem(val) {
@@ -136,12 +149,27 @@ export default {
 			newId:0,
 			playId:'',
 			clickLock:false, //点击锁,防止连续点击多次
+			moduleSectionExam: [], // 模块下的所有节试卷列表
+			chapterExams: {},
+			moduleExams: {},
 		};
 	},
 	onLoad() {
 	},
 	created() {
-		
+		if (this.testType == 3) {
+			// 模块下的所有节试卷列表
+			this.$api.reSectionExamList({
+				chapterId: 0,
+				courseId: this.courseId,
+				gradeId: this.gradeId
+			}).then((res) => {
+				if (res.data.code == 200) {
+					this.moduleSectionExam = res.data.data || []
+					console.log(this.moduleSectionExam, 'this.moduleSectionExam');
+				}
+			})
+		}
 	},
 	mounted() {
 		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
@@ -156,7 +184,7 @@ export default {
 		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
 		let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
 		this.playId = playNextId;
-		console.log('this.playId:', this.playId)
+		// console.log('this.playId:', this.playId)
 		uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
 		uni.$once('playNext'+playNextId, (data) => {
 			//到时会触发每个节的监听事件,只允许当前节的接收
@@ -207,12 +235,82 @@ export default {
 				let sectionASame = this.liveLast.sectionId == (this.menuItem.sectionId || this.menuItem.menuId)
 				let chapterSame = this.liveLast.chapterId == (this.menuItem.chapterId || 0)
 				let moduleSame = this.liveLast.moduleId == (this.menuItem.moduleId || 0);
-				console.log(sectionASame && chapterSame && moduleSame,'sectionASame && chapterSame && moduleSame')
+				// console.log(sectionASame && chapterSame && moduleSame,'sectionASame && chapterSame && moduleSame')
 				return sectionASame && chapterSame && moduleSame
 			} else {
 				return false;
 			}
 			
+		},
+		toDoSectionExam() {
+			this.$emit('togoBack', 1)
+		},
+		checkTest() {
+			let data = this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam
+			// console.log('data:',this.testType, data, this.moduleSectionExam, this.ChapterSectionExam)
+			let id = this.testType == 3 ? this.menuItem.menuId : this.menuItem.sectionId
+			if (!data) {
+				return false
+			}
+			return data.some((e) => e.sectionId == id)
+		},
+		ChapterExam() {
+			this.chapterExams = this.ChapterSectionExam.find((e) => e.sectionId == this.menuItem.sectionId)
+			console.log('item', this.chapterExams)
+			let moduleId = this.chapterExams.moduleId || 0
+			let chapterId = this.chapterExams.chapterId || 0
+			let sectionId = this.chapterExams.sectionId || this.chapterExams.menuId
+			uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                this.chapterExams.typeId +
+                "&goodsid=" +
+                this.goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+				"&sectionId=" +
+                sectionId +
+                "&orderGoodsId=" +
+                this.orderGoodsId +
+				"&types=2"
+                ,
+            });
+		},
+		ModuleExam() {
+			let sectionId = this.menuItem.sectionId || this.menuItem.menuId
+			console.log('this.moduleSectionExam: ', this.moduleSectionExam, sectionId)
+			this.moduleExams = this.moduleSectionExam.find((e) => e.sectionId == sectionId)
+			console.log('item--', this.moduleExams)
+			let moduleId = this.moduleExams.moduleId || 0
+			let chapterId = this.moduleExams.chapterId || 0
+			
+			uni.navigateTo({
+              url:
+                "/pages2/class/questionBank?courseId=" +
+                this.courseId +
+                "&gradeId=" +
+                this.gradeId +
+                "&isFromVideo=1&id=" +
+                this.moduleExams.typeId +
+                "&goodsid=" +
+                this.goodsId +
+                "&moduleId=" +
+                moduleId +
+                "&chapterId=" +
+                chapterId +
+				"&sectionId=" +
+                sectionId +
+                "&orderGoodsId=" +
+                this.orderGoodsId +
+				"&types=2"
+                ,
+            });
 		},
 		studyRecordMenuAllList() {
 			return new Promise(resolve => {
@@ -254,6 +352,7 @@ export default {
 			})
 		},
 		async getVideo(){
+			
 			if(this.clickLock) {
 				return;
 			}
@@ -451,8 +550,8 @@ export default {
 				let learnNum = await this.goodsTodayStudySectionNum()
 				let hasLearn = await this.gradeCheckGoodsStudy();
 				
-				console.log(this.sectionMaxNum,'this.sectionMaxNum')
-				console.log(learnNum,'learnNum')
+				// console.log(this.sectionMaxNum,'this.sectionMaxNum')
+				// console.log(learnNum,'learnNum')
 				if(this.sectionMaxNum > 0 && !this.isLive) {
 					if(learnNum >= this.sectionMaxNum && !hasLearn) {
 						uni.showToast({
@@ -673,4 +772,14 @@ export default {
 		font-size: 20rpx;
 		padding: 5rpx;
 	}
+	.exercises {
+		width: 56rpx;
+		height: 38rpx;
+		text-align: center;
+		line-height: 38rpx;
+		font-size: 20rpx;
+		background: #007aff;
+		border-radius: 8rpx;
+		color: #ffffff;
+	}
 </style>

+ 6 - 0
pages2/bank/questionBank.vue

@@ -915,9 +915,11 @@ export default {
       examData: {},
       orderGoodsId: "",
       cgType: 0, //对应设计稿弹窗编码
+      courseId: '',
     };
   },
   async onLoad(option) {
+    this.courseId = option.courseId
     this.orderGoodsId = option.orderGoodsId || 0;
     this.current = +option.current || 0;
     this.id = option.id;
@@ -1480,6 +1482,8 @@ export default {
           goodsId: this.goodsId,
           totalQuestionNum: questionList,
           allQuestionNum: this.questionList.length,
+          courseId: this.courseId,
+          // type: ''
         })
         .then((res) => {
           this.recordId = res.data.data;
@@ -2131,6 +2135,7 @@ export default {
       //交卷
       this.$api
         .examRecordEdit({
+          courseId: this.courseId,
           examId: this.id,
           goodsId: this.goodsId,
           reportStatus: reportStatus,
@@ -2149,6 +2154,7 @@ export default {
           examTime: parseInt(this.allTimes),
           doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
           historyExamJson: JSON.stringify(this.questionList),
+          // type: ''
         })
         .then((res) => {
           this.isSubmit = true;

+ 13 - 0
pages2/class/questionBank.vue

@@ -843,6 +843,7 @@ export default {
       lastCount: 0, //剩余没有回答的题目数
       chapterId: 0,
       moduleId: 0,
+      sectionId: 0,
       showArrow: false, //退出提示
       isFromVideo: "",
       gradeId: "",
@@ -855,13 +856,16 @@ export default {
       orderGoodsId: 0,
       isTaking: true, //是否正在拍照
       needPhoto: false, //是否需要拍照
+      examType: 0, // 3-模块,1-章,2-节
     };
   },
   async onLoad(option) {
+    this.examType = option.types
     this.id = option.id;
     this.goodsId = option.goodsid;
     this.chapterId = option.chapterId;
     this.courseId = option.courseId;
+    this.sectionId = option.sectionId
     this.moduleId = option.moduleId;
     this.isFromVideo = option.isFromVideo || "";
     this.gradeId = option.gradeId || "";
@@ -1458,6 +1462,7 @@ export default {
         .bankRecordEdit({
           chapterId: this.chapterId || 0,
           moduleId: this.moduleId || 0,
+          sectionId: this.sectionId || 0,
           examId: this.id,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
@@ -1471,6 +1476,7 @@ export default {
           gradeId: this.gradeId,
           performance: score,
           totalScore: allScore,
+          type: this.examType,
           // examTime: parseInt(this.allTimes),
           // doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
           // historyExamJson: JSON.stringify(this.questionList)
@@ -1586,6 +1592,7 @@ export default {
           .bankRecordEdit({
             chapterId: this.chapterId || 0,
             moduleId: this.moduleId || 0,
+            sectionId: this.sectionId || 0,
             gradeId: this.gradeId,
             examId: this.id,
             courseId: this.courseId,
@@ -1596,6 +1603,7 @@ export default {
             performance: score,
             reportStatus: reportStatus,
             status: 1,
+            type: this.examType,
             // historyExamJson: JSON.stringify(this.questionList)
           })
           .then((res) => {});
@@ -1792,14 +1800,17 @@ export default {
 
         this.$api
           .bankRecord({
+            courseId: this.courseId,
             chapterExamId: this.chapterId || 0,
             moduleExamId: this.moduleId || 0,
+            sectionId: this.sectionId || 0,
             examId: this.id,
             goodsId: this.goodsId,
             orderGoodsId: this.orderGoodsId,
             gradeId: this.gradeId,
             totalQuestionNum: questionList,
             allQuestionNum: this.questionList.length,
+            type: this.examType,
           })
           .then((res) => {
             this.recordId = res.data.data;
@@ -2194,6 +2205,7 @@ export default {
         .bankRecordEdit({
           moduleId: this.moduleId || 0,
           chapterId: this.chapterId || 0,
+          sectionId: this.sectionId || 0,
           gradeId: this.gradeId,
           examId: this.id,
           goodsId: this.goodsId,
@@ -2208,6 +2220,7 @@ export default {
           // doQuestionNum: doQuestionNum,
           performance: score,
           totalScore: allScore,
+          type: this.examType,
           // examTime: parseInt(this.allTimes),
           // doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
           // historyExamJson: JSON.stringify(this.questionList)

+ 9 - 3
pages3/polyv/detail.vue

@@ -148,6 +148,7 @@
                 :isBuy="true"
                 :menuItem="item"
                 :levelId="item.menuId"
+                :goodsType='1'
               ></courseModule
             ></view>
             <!--章 -->
@@ -167,12 +168,12 @@
                 :menuItem="item"
                 :levelId="'0-' + item.menuId"
                 :goodsType='1'
-                @sectionList='sectionList($event, index)'
               ></courseChapter
             ></view>
             <!--节 -->
             <view v-if="item.type == 3"
               ><courseSection
+                ref="MoudleSection"
                 v-if="reStart"
 								:orderGoodsId="orderGoodsId"
                 :sectionMaxNum="goodsData.sectionMaxNum"
@@ -185,6 +186,9 @@
                 :isBuy="true"
                 :menuItem="item"
                 :levelId="'0-0-' + item.menuId"
+                :goodsType='1'
+                :testType="3"
+                @togoBack="togoBack($event)"
               ></courseSection
             ></view>
           </view>
@@ -764,8 +768,10 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
-    sectionList(value) {
-      console.log('返回返回', value)
+    // 调用节的方法
+    togoBack(value) {
+      // console.log('模块的节', value , this.$refs.MoudleSection)
+      this.$refs.MoudleSection[0].ModuleExam()
     },
     // 新增微信公众号模板消息点击数据
     clickOfficial() {