From e6a156a6a8bb6f1d3a17e9310269f53c56e10b42 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期一, 08 四月 2024 22:29:26 +0800
Subject: [PATCH] 问题修改

---
 packageBookService/pages/bookServices/detail/index.js |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 37ed055..97cf4ee 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -812,6 +812,7 @@
       },
     };
     let data = await app.MG.store.getProductDetail(query);
+    // 濡傛灉item灞傜骇閲屾湁floder锛屽垹闄loder
     const flag = data.datas.cmsDatas[0].datas.findIndex(
       (item) => item.sysType == "CmsItem"
     );
@@ -953,8 +954,7 @@
         remarks: "鐢靛瓙涔�",
         requests: [{
           saleMethodId: this.data.bookItemDetail.defaultSaleMethodId ?
-            this.data.bookItemDetail.defaultSaleMethodId :
-            this.data.bookDetail.defaultSaleMethodId,
+            this.data.bookItemDetail.defaultSaleMethodId : this.data.bookDetail.defaultSaleMethodId,
           count: 1,
         }, ],
       };
@@ -1847,14 +1847,7 @@
           });
           return false;
         }
-        if (this.data.electronicBookList.length >= 2) {
-          wx.showToast({
-            title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�",
-            icon: "none",
-            duration: 1000,
-          });
-          return false;
-        }
+
         let isHas = this.data.electronicBookList.find(
           (eitem) => eitem.id == this.data.bookDetail.id
         );
@@ -1872,6 +1865,14 @@
         if (isApply) {
           wx.showToast({
             title: "璇ヤ功宸茬敵璇凤紒",
+            icon: "none",
+            duration: 1000,
+          });
+          return false;
+        }
+        if (this.data.electronicBookList.length >= 2) {
+          wx.showToast({
+            title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�",
             icon: "none",
             duration: 1000,
           });
@@ -1916,14 +1917,18 @@
           });
           return false;
         }
-        if (this.data.paperBookList.length >= 2) {
+        let isApply = this.data.alreadyPaperBookList.find(
+          (pitem) => pitem.id == this.data.bookDetail.id
+        );
+        if (isApply) {
           wx.showToast({
-            title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�",
+            title: "璇ヤ功宸茬敵璇凤紒",
             icon: "none",
             duration: 1000,
           });
           return false;
         }
+
         let isHas = this.data.paperBookList.find(
           (pitem) => pitem.id == this.data.bookDetail.id
         );
@@ -1935,12 +1940,9 @@
           });
           return false;
         }
-        let isApply = this.data.alreadyPaperBookList.find(
-          (pitem) => pitem.id == this.data.bookDetail.id
-        );
-        if (isApply) {
+        if (this.data.paperBookList.length >= 2) {
           wx.showToast({
-            title: "璇ヤ功宸茬敵璇凤紒",
+            title: "姣忔鏈�澶氬彧鍙敵璇�2鏈牱涔�",
             icon: "none",
             duration: 1000,
           });

--
Gitblit v1.9.1