From 4bc1c36faeec2f90e5acfa836732e49fe0b245e9 Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期五, 12 四月 2024 20:47:03 +0800
Subject: [PATCH] 云学习11

---
 pages/study/index.js |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/pages/study/index.js b/pages/study/index.js
index cb9b87e..1e682d6 100644
--- a/pages/study/index.js
+++ b/pages/study/index.js
@@ -36,22 +36,7 @@
    */
   onLoad() {
     // 妫�鏌ョ櫥褰曠姸鎬�
-    const token = wx.getStorageSync(app.config.tokenKey)
-    if (!token) {
-      loginInfo(app, (data) => {
-        if (data) {
-          this.getUserInfo()
-          this.getStaticsSum();
-          this.getDataList(false);
 
-        }
-      })
-    } else {
-      this.getUserInfo()
-      this.getStaticsSum();
-      this.getDataList(false);
-
-    }
 
   },
 
@@ -71,6 +56,21 @@
         active: 2
       })
     }
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {
+          this.getUserInfo()
+          this.getStaticsSum();
+          this.getDataList(false);
+        }
+      })
+    } else {
+      this.getUserInfo()
+      this.getStaticsSum();
+      this.getDataList(false);
+
+    }
 
   },
   getUserInfo() {

--
Gitblit v1.9.1