From 0cfbfb6ec666ec62d4935eca539ad823834b0765 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期一, 30 九月 2024 11:29:35 +0800
Subject: [PATCH] 1

---
 pages/home/home.js |    4 ++--
 app.js             |    6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app.js b/app.js
index e203b18..38af179 100644
--- a/app.js
+++ b/app.js
@@ -11,7 +11,11 @@
       appRefCode: config.appRefCode,
       token: wx.getStorageSync(config.tokenKey)
     }).then(res => {
-      console.log('宸插埛鏂�')
+      console.log(res, '宸插埛鏂�')
+      if (res.token) {
+        wx.setStorageSync(config.tokenKey, res.token);
+      }
+
     })
   },
 });
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
index 71d2aea..fd1ab24 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -50,7 +50,7 @@
     if (token) {
       this.getShoppingCartList()
     }
-
+    this.init();
   },
 
   onLoad() {
@@ -77,7 +77,7 @@
         }
       })
     }
-    this.init();
+
   },
   onReachBottom() {},
   onPullDownRefresh() {

--
Gitblit v1.9.1