From d0830f5b4976eb2a7066a16dadc37ce1985bf730 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 15 八月 2024 09:37:55 +0800
Subject: [PATCH] ll
---
wechat_staff/app.js | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/wechat_staff/app.js b/wechat_staff/app.js
index 3dc96bb..498f908 100644
--- a/wechat_staff/app.js
+++ b/wechat_staff/app.js
@@ -1,4 +1,7 @@
-// app.js
+import {
+ wxLoginCustomer,
+ getMemberInfo
+} from './api/index'
App({
globalData: {
primary: '#B08771',
@@ -10,7 +13,20 @@
if (WindowInfo.safeArea.top > 20) {
this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom;
}
- //
- // let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
- }
-})
+ },
+ onShow() {
+ let users = wx.getStorageSync('token')
+ if (users == null) {
+ wx.reLaunch({
+ url: '/pages/login/index',
+ })
+ wx.showLoading({
+ title: '鎺堟潈鐧诲綍涓�'
+ })
+ } else {
+ getMemberInfo({
+ goLogin: true
+ }).then(res => {})
+ }
+ },
+})
\ No newline at end of file
--
Gitblit v1.9.3