From e2b9cf5cb19ba0ae4bffd787d96f0d0cb8fb63bf Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 09 七月 2024 15:52:58 +0800
Subject: [PATCH] css

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

diff --git a/pages/index/resourceCover.js b/pages/index/resourceCover.js
index 683ad99..731edf3 100644
--- a/pages/index/resourceCover.js
+++ b/pages/index/resourceCover.js
@@ -1,5 +1,8 @@
 // pages/index/resourceCover.js
 const app = getApp()
+import {
+  loginInfo
+} from '../../assets/js/login';
 Page({
 
   /**
@@ -20,9 +23,22 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    if (options.scene) {
-      this.getBookInfo(options.scene)
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋�
+        if (data) {
+          if (options.scene) {
+            this.getBookInfo(options.scene)
+          }
+        }
+      })
+    } else {
+      if (options.scene) {
+        this.getBookInfo(options.scene)
+      }
     }
+
   },
 
   /**

--
Gitblit v1.9.1