Browse Source

Merge branch 'master' into dev

谢杰标 2 years ago
parent
commit
3bb4d05747
2 changed files with 37 additions and 12 deletions
  1. 36 11
      components/course/courseModule.vue
  2. 1 1
      pages3/polyv/detail.vue

+ 36 - 11
components/course/courseModule.vue

@@ -266,12 +266,42 @@ export default {
       if (item.doType === 2 && item.learning == 1) {
         return;
       }
-      let newRows = [];
-      newRows = this.menuAllList.filter((e) => e.moduleId == moduleId);
-      let isAllLearn = newRows.every((item) => {
-        return item.studyStatus == 1;
-      });
-      if (isAllLearn) {
+      if (this.learningOrder == 2) {
+        let newRows = [];
+        newRows = this.menuAllList.filter((e) => e.moduleId == moduleId);
+        let isAllLearn = newRows.every((item) => {
+          return item.studyStatus == 1;
+        });
+        if (isAllLearn) {
+          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 +
+              "&type=3" +
+              "&learning=" +
+              item.learning +
+              "&isBackVideo=" +
+              1,
+          });
+        } else {
+          uni.showToast({
+            icon: "none",
+            title: "请学完视频课程再进行练习和测试",
+          });
+        }
+      } else {
         uni.navigateTo({
           url:
             "/pages2/class/questionBank?courseId=" +
@@ -294,11 +324,6 @@ export default {
             "&isBackVideo=" +
             1,
         });
-      } else {
-        uni.showToast({
-          icon: "none",
-          title: "请学完视频课程再进行练习和测试",
-        });
       }
     },
   },

+ 1 - 1
pages3/polyv/detail.vue

@@ -977,7 +977,6 @@ export default {
       this.showMark = true;
       return;
     }
-    !this.userInfo && this.$api.refreshUserInfo();
     this.courseId = Number(option.id) || "";
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || "";
@@ -997,6 +996,7 @@ export default {
     if (this.$method.isGoLogin()) {
       return;
     }
+    !this.userInfo && this.$api.refreshUserInfo();
     this.closePhoto();
     this.courseCourseList();
   },