| | |
| | | // app.js |
| | | import { |
| | | wxLoginCustomer, |
| | | getMemberInfo |
| | | } from './api/index' |
| | | App({ |
| | | globalData: { |
| | | primary: '#B08771', |
| | |
| | | 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 => {}) |
| | | } |
| | | }, |
| | | }) |