natasha 1 тиждень тому
батько
коміт
71a7377637
1 змінених файлів з 21 додано та 0 видалено
  1. 21 0
      src/views/bookStore/Subscribe.vue

+ 21 - 0
src/views/bookStore/Subscribe.vue

@@ -986,6 +986,7 @@ export default {
       this.customOrderNumberList = [];
       this.coverObj = [];
       this.handleCoverSrc();
+      this.handleOrderYearStartNO();
       await this.handleIssueLength();
     },
     changeOrderNumber(item, flag) {
@@ -1143,6 +1144,25 @@ export default {
         }
       }
     },
+    // 计算年订阅起始期数
+    handleOrderYearStartNO() {
+      let MethodName =
+        "/ShopServer/Client/ReservationQuery/GetYearReservationStartN0";
+      let data = {
+        goods_type: this.bookType === "baozhi" ? 2 : 4,
+        study_phase: this.bookType === "baozhi" ? this.studyType : 1,
+      };
+      getLogin(MethodName, data)
+        .then((res) => {
+          if (res.status === 1) {
+            this.orderList[5].label =
+              "年订阅(当月起订," + res.issue_no_start + "期起)";
+          } else {
+            this.orderList[5].label = "年订阅(当月起订)";
+          }
+        })
+        .catch(() => {});
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   async created() {
@@ -1156,6 +1176,7 @@ export default {
       this.previousPage = arr[4] ? arr[4] : "商城";
     }
     if (this.bookType === "baozhi" || this.bookType === "huakan") {
+      this.handleOrderYearStartNO();
       await this.handleIssueLength();
     } else {
       this.getInfo();