谢杰标 2 жил өмнө
parent
commit
bb1b34048f

+ 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: "请学完视频课程再进行练习和测试",
-        });
       }
     },
   },