liukangdong
2024-08-01 744c16a15432461394e1e2dbdfaea34a766fcc6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import {
  wxLoginCustomer,
  getMemberInfo
} from './api/index'
App({
  globalData: {
    primary: '#B08771',
    bottomLift: ''
  },
  onLaunch: function () {
    //获取当前设备信息
    const WindowInfo = wx.getWindowInfo()
    if (WindowInfo.safeArea.top > 20) {
      this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom;
    }
    let users =  wx.getStorageSync('token') 
    if(users ==null){
      wx.navigateTo({
        url: '/pages/login/index',
      })
      wx.showLoading({title: '授权登录中'})
    }else{
      getMemberInfo({goLogin:true}).then(res => {  
      }) 
    }
  }, 
})