谢杰标 2 سال پیش
والد
کامیت
23f1e0c11d
4فایلهای تغییر یافته به همراه26 افزوده شده و 25 حذف شده
  1. 1 1
      components/course/courseChapter.vue
  2. 5 3
      components/course/courseSection.vue
  3. 20 20
      pages3/polyv/detail.vue
  4. 0 1
      store/index.js

+ 1 - 1
components/course/courseChapter.vue

@@ -283,7 +283,7 @@ export default {
       let learnNum = await this.goodsTodayStudySectionNum();
       // 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
       let hasLearn = await this.gradeCheckGoodsStudy(id);
-
+     
       if (this.sectionMaxNum > 0) {
         if (learnNum >= this.sectionMaxNum && !hasLearn) {
           uni.showToast({

+ 5 - 3
components/course/courseSection.vue

@@ -253,7 +253,9 @@ export default {
       this.isRebuild ? "isRebuild" : ""
     }`;
     this.playId = playNextId;
-    // console.log('playNextId:', this.playNextId, 'playId:', this.playId);
+    if(this.playSectionId == this.newId){
+      this.$store.commit("updatePlayNextId", playNextId);
+    }
     uni.$off("playNext" + playNextId); //绑定前先移除之前的事件
     uni.$once("playNext" + playNextId, async (data) => {
       //到时会触发每个节的监听事件,只允许当前节的接收
@@ -446,8 +448,8 @@ export default {
       if (this.$method.isGoLogin()) {
         return;
       }
-      if(this.menuItem.id==this.playSectionId){
-        return
+      if (this.menuItem.id == this.playSectionId) {
+        return;
       }
       this.clickLock = true;
       if (this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) {

+ 20 - 20
pages3/polyv/detail.vue

@@ -3269,30 +3269,31 @@ export default {
         if (data.doType == 2) {
           uni.showModal({
             title: "温馨提示",
-            content: "当前节视频已学完,是否进入  ?",
+            content: "当前节视频已学完,是否进入考试?",
             success: (res) => {
               if (res.confirm) {
                 uni.navigateTo({
                   url:
                     "/pages2/class/questionBank?courseId=" +
-                    this.courseId +
-                    "&gradeId=" +
-                    this.gradeId +
-                    "&isFromVideo=1&id=" +
-                    data.id +
-                    "&goodsid=" +
-                    this.goodsId +
-                    "&moduleId=" +
-                    data.moduleId +
-                    "&chapterId=" +
-                    data.chapterId +
-                    "&orderGoodsId=" +
-                    this.orderGoodsId +
-                    "&type=3" +
-                    "&learning=" +
-                    data.studyStatus +
-                    "&isBackVideo=" +
-                    1,
+                      this.courseId +
+                      "&gradeId=" +
+                      this.gradeId +
+                      "&isFromVideo=1&id=" +
+                      data.id +
+                      "&goodsid=" +
+                      this.goodsId +
+                      "&moduleId=" +
+                      (data.moduleId || 0) +
+                      "&chapterId=" +
+                      (data.chapterId || 0) +
+                      "&orderGoodsId=" +
+                      this.orderGoodsId +
+                      "&type=" +
+                      (data.type == 4 ? 1: 3) +
+                      "&learning=" +
+                      data.studyStatus +
+                      "&isBackVideo=" +
+                      1,
                 });
               }
             },
@@ -3668,7 +3669,6 @@ export default {
             self.H5isAllowSeek = "off";
             // #endif
           }
-
           if (self.goodsPlayConfig.speed > 0) {
             self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
           }

+ 0 - 1
store/index.js

@@ -121,7 +121,6 @@ const store = new Vuex.Store({
       state.allowLoading = isShowloading;
     },
     updatePlayNextId(state, str) {
-      console.log(str, "str");
       state.playNextId = str;
     },
     updateChapterOpen(state, boolean) {