浏览代码

fix: 节卷跳转问题

xuqiaoying 2 年之前
父节点
当前提交
a743cf8f96
共有 3 个文件被更改,包括 15 次插入10 次删除
  1. 4 4
      components/course/courseChapter.vue
  2. 7 2
      components/course/courseSection.vue
  3. 4 4
      pages3/polyv/detail.vue

+ 4 - 4
components/course/courseChapter.vue

@@ -26,8 +26,8 @@
             :levelId="levelId + '-' + itemM.sectionId"
             :levelId="levelId + '-' + itemM.sectionId"
             :testType="2"
             :testType="2"
             :ChapterSectionExam='sectionExam'
             :ChapterSectionExam='sectionExam'
-            @togoBack='togoBack()'
           ></courseSection>
           ></courseSection>
+          <!-- @togoBack='togoBack()' -->
           <u-line v-if="indexM < list.length - 1"></u-line>
           <u-line v-if="indexM < list.length - 1"></u-line>
         </view>
         </view>
         <view v-if="itemM.type == 2">
         <view v-if="itemM.type == 2">
@@ -161,9 +161,9 @@ export default {
   methods: {
   methods: {
     ...mapMutations(["updateChapterOpen"]),
     ...mapMutations(["updateChapterOpen"]),
     // 调用节的方法
     // 调用节的方法
-    togoBack(value) {
-      this.$refs.ChapterSection[0].ChapterExam()
-    },
+    // togoBack(value) {
+    //   this.$refs.ChapterSection[0].ChapterExam()
+    // },
     goodsTodayStudySectionNum() {
     goodsTodayStudySectionNum() {
       return new Promise((resolve) => {
       return new Promise((resolve) => {
         this.$api
         this.$api

+ 7 - 2
components/course/courseSection.vue

@@ -229,7 +229,12 @@ export default {
 			
 			
 		},
 		},
 		toDoSectionExam() {
 		toDoSectionExam() {
-			this.$emit('togoBack', 1)
+			// this.$emit('togoBack', 1)
+			if (this.testType == 3) {
+				this.ModuleExam()
+			} else {
+				this.ChapterExam()
+			}
 		},
 		},
 		checkTest() {
 		checkTest() {
 			let data = this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam
 			let data = this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam
@@ -298,7 +303,7 @@ export default {
 			})
 			})
 		},
 		},
 		async getVideo(){
 		async getVideo(){
-			
+			console.log('this.menuItem:', this.menuItem);
 			if(this.clickLock) {
 			if(this.clickLock) {
 				return;
 				return;
 			}
 			}

+ 4 - 4
pages3/polyv/detail.vue

@@ -189,9 +189,9 @@
                 :levelId="'0-0-' + item.menuId"
                 :levelId="'0-0-' + item.menuId"
                 :goodsType='1'
                 :goodsType='1'
                 :testType="3"
                 :testType="3"
-                @togoBack="togoBack($event)"
               ></courseSection
               ></courseSection
             ></view>
             ></view>
+            <!-- @togoBack="togoBack($event)" -->
           </view>
           </view>
         </view>
         </view>
         <!--讲义 -->
         <!--讲义 -->
@@ -805,9 +805,9 @@ export default {
   methods: {
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
     // 调用节的方法
     // 调用节的方法
-    togoBack(value) {
-      this.$refs.MoudleSection[0].ModuleExam()
-    },
+    // togoBack(value) {
+    //   this.$refs.MoudleSection[0].ModuleExam()
+    // },
     // 新增微信公众号模板消息点击数据
     // 新增微信公众号模板消息点击数据
     clickOfficial() {
     clickOfficial() {
       this.$http({
       this.$http({