From e40fa3df043df12622fd0b654cd3ea9c147b96d7 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期三, 16 七月 2025 23:29:10 +0800
Subject: [PATCH] 增加价格为0的判断,留下逻辑遗漏点

---
 pages/home/home.js |   49 +++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 30 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index cf9916e..2db5511 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -140,7 +140,6 @@
         list.push({
           value: item.icon,
           link: item.jsek_link,
-
         })
       }
       this.setData({
@@ -180,24 +179,9 @@
           url: info.url
         })
       } else {
-        if (info.text == '鏁板瓧闃呰') {
-          if (wx.getStorageSync(app.config.tokenKey)) {
-            wx.navigateTo({
-              url: info.url
-            })
-          } else {
-            loginInfo(app, (data) => {
-              if (data) {
-                this.registe()
-              }
-            })
-          }
-        } else {
-          wx.navigateTo({
-            url: info.url
-          })
-        }
-
+        wx.navigateTo({
+          url: info.url
+        })
       }
     } else {
       wx.showToast({
@@ -487,6 +471,19 @@
     const item = e.currentTarget.dataset.book
     // 缃戦〉绫诲瀷璺宠浆鍒扮綉鍧�澶嶅埗椤碉紝鍥犱负url浼犲弬涓嶈兘浼� 甯﹀弬鏁扮殑缃戠粶鍦板潃锛屾墍浠ユ澶勮鎶婄綉缁滃湴鍧�閲岀殑浼犲弬鎽樺嚭鏉ワ紝鏀惧埌url閲�
     let urlData = ''
+    if (!item.jsek_link) {
+      wx.showModal({
+        title: '鎻愮ず',
+        content: '鏆傛棤鍐呭',
+        showCancel: false,
+        success: (res) => {
+          if (res.confirm) {
+            console.log(res, '3232')
+          }
+        }
+      })
+      return false;
+    }
     const flags = item.jsek_link.indexOf("?")
     if (flags > -1) {
       urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length)
@@ -516,17 +513,9 @@
     const {
       book
     } = e.currentTarget.dataset;
-    if (wx.getStorageSync(app.config.tokenKey)) {
-      wx.navigateTo({
-        url: '/pages/home/digitalRead/index?productId=' + book.id,
-      });
-    } else {
-      loginInfo(app, (data) => {
-        if (data) {
-          this.registe()
-        }
-      })
-    }
+    wx.navigateTo({
+      url: '/pages/home/digitalRead/index?productId=' + book.id,
+    });
   },
   goTextBookDetail(e) {
     const {

--
Gitblit v1.9.1