From 80921e1122d8dcf8d0080015b00b8df5cadb90e6 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 06 九月 2024 11:47:50 +0800
Subject: [PATCH] study

---
 packageBookService/pages/bookServices/detail/index.js |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 8e0ddd0..fb740b3 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -198,14 +198,21 @@
         id: options.id,
         name: options.name,
         storeInfo: options.storeInfo,
+
       },
     });
     wx.setNavigationBarTitle({
       title: options.name,
     })
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.getBookInfo(options.id);
     // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫�
-    const token = wx.getStorageSync(app.config.tokenKey);
+
     if (token) {
       this.getShoppingCartProductGet();
       this.getApplyInfo(options.id);
@@ -219,6 +226,15 @@
       // 鑾峰彇鐢宠娆℃暟
       this.getSelectPaperBookCount();
       this.getSelectBookCount();
+    }
+    if (options.tabValue) {
+      this.setData({
+        tabValue: options.tabValue,
+      });
+      const checkData = this.data.cmsDatas.find(
+        (item) => item.refCode == options.tabValue
+      );
+      this.getResourceDataList(checkData)
     }
   },
 
@@ -719,7 +735,7 @@
       e.detail.label == "浜戞祴璇�"
     ) {
       const checkData = this.data.cmsDatas.find(
-        (item) => item.refCode == e.detail.value
+        (item) => item.refCode == this.data.tabValue
       );
       if (!this.data.resourceClassList.length) this.getResourceClass()
       if (checkData) {

--
Gitblit v1.9.1