En route 1 éve
szülő
commit
7fb484fee8
1 módosított fájl, 22 hozzáadás és 17 törlés
  1. 22 17
      src/pages/course-detail/components/coreContent.vue

+ 22 - 17
src/pages/course-detail/components/coreContent.vue

@@ -278,23 +278,26 @@ export default {
           if (res.code == 200) {
             this.gradeDetail = res.data;
             let nowTime = parseInt(new Date().getTime() / 1000);
-            if (res.data.classEndTime < nowTime) {
-              this.$confirm(
-                `当前课程所属班级有效期已过期,无法继续学习!`,
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  closeOnClickModal: false,
-                  closeOnPressEscape: false,
-                  showCancelButton: false,
-                  distinguishCancelAndClose: false,
-                  showClose: false,
-                }
-              )
-                .then((_) => {
-                  this.$router.back(-1);
-                })
-                .catch((_) => {});
+            if (this.goodsData.erJianErZao || this.goodsData.jjShiGongYuan) {
+              if (res.data.classEndTime && res.data.classEndTime < nowTime) {
+                this.$confirm(
+                  `当前课程所属班级有效期已过期,无法继续学习!`,
+                  "提示",
+                  {
+                    confirmButtonText: "确定",
+                    closeOnClickModal: false,
+                    closeOnPressEscape: false,
+                    showCancelButton: false,
+                    distinguishCancelAndClose: false,
+                    showClose: false,
+                  }
+                )
+                  .then((_) => {
+                    this.$router.back(-1);
+                  })
+                  .catch((_) => {});
+                return;
+              }
             }
             if (res.data.interfaceAccountId > 0 && res.data.learnStatus > 0) {
               const confirmText = [
@@ -343,6 +346,7 @@ export default {
                   this.$router.back(-1);
                 })
                 .catch((_) => {});
+              return;
             }
             if (
               res.data.learningStatus == 3 &&
@@ -364,6 +368,7 @@ export default {
                   this.$router.back(-1);
                 })
                 .catch((_) => {});
+              return;
             }
             if (
               (res.data.interfaceAccountId > 0 && res.data.learnStatus > 0) ||