From 7eea32a9a7a034e951468bea279688e8db5c1c98 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 09 九月 2024 14:31:51 +0800
Subject: [PATCH] bug

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

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index fb740b3..815a389 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -1,6 +1,7 @@
 // pages/bookServices/detail/index.js
 import Toast from "tdesign-miniprogram/toast";
 import tool from "../../../../assets/js/toolClass";
+import moment from 'moment'
 import {
   loginInfo
 } from "../../../../assets/js/login";
@@ -192,19 +193,16 @@
       bookId: options.id + "",
       barHeight: systInfo.statusBarHeight,
       navBarHeight: navBarHeight,
-    });
-    this.setData({
       options: {
         id: options.id,
-        name: options.name,
+        name: decodeURI(options.name),
         storeInfo: options.storeInfo,
-
       },
     });
     wx.setNavigationBarTitle({
-      title: options.name,
+      title: decodeURI(options.name),
     })
-    const token = wx.getStorageSync(app.config.tokenKey)
+    let token = wx.getStorageSync(app.config.tokenKey)
     if (!token) {
       loginInfo(app, (data) => {
         if (data) {} else {}
@@ -212,7 +210,7 @@
     }
     this.getBookInfo(options.id);
     // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫�
-
+    token = wx.getStorageSync(app.config.tokenKey)
     if (token) {
       this.getShoppingCartProductGet();
       this.getApplyInfo(options.id);
@@ -231,10 +229,8 @@
       this.setData({
         tabValue: options.tabValue,
       });
-      const checkData = this.data.cmsDatas.find(
-        (item) => item.refCode == options.tabValue
-      );
-      this.getResourceDataList(checkData)
+
+
     }
   },
 
@@ -454,6 +450,16 @@
           await this.getBookClass(classData);
         }
       }
+      if (this.data.tabValue == 'questionBank' || this.data.tabValue == 'jsek_cloudLearning' || this.data.tabValue == 'jsek_teachingResources') {
+        const checkData = this.data.cmsDatas.find(
+          (item) => item.refCode == this.data.tabValue
+        );
+        if (this.data.tabValue == "questionBank") {
+          this.getResourceData(checkData)
+        } else {
+          this.getResourceDataList(checkData)
+        }
+      }
 
       // 鑾峰彇缁勫嵎閿�鍞甶d
       if (res.datas.saleMethod && res.datas.saleMethod.length) {
@@ -481,9 +487,7 @@
         }
       }
       this.setData({
-        "bookDetail.publicationDate": this.formatDate(
-          this.data.bookDetail.publicationDate
-        ),
+        "bookDetail.publicationDate": moment(this.data.bookDetail.publicationDate).format("YYYY骞碝M鏈�"),
         "bookDetail.price": this.numFormat(this.data.bookDetail.price),
         "bookDetail.oldPrice": this.numFormat(this.data.bookDetail.oldPrice),
         "bookDetail.paperPrice": this.numFormat(
@@ -719,7 +723,7 @@
       link
     } = e.currentTarget.dataset;
     wx.navigateTo({
-      url: `/packageBookService/pages/bookServices/webpage/index?url=${link}`,
+      url: `/packageBookService/pages/bookServices/linkPage/index?path=${link}`,
     });
   },
   // tag鍒囨崲

--
Gitblit v1.9.1