12345678910111213141516171819202122232425262728293031323334 |
- App({
- onLaunch() {
-
- const logs = wx.getStorageSync('logs') || []
- logs.unshift(Date.now())
- wx.setStorageSync('logs', logs)
-
- wx.login({
- success: res => {
-
- wx.setStorageSync('wxCode', res.code)
- }
- });
-
- wx.getSystemInfo({
- success: e => {
- this.globalData.StatusBar = e.statusBarHeight;
- let capsule = wx.getMenuButtonBoundingClientRect();
- if (capsule) {
- this.globalData.Custom = capsule;
- this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
- } else {
- this.globalData.CustomBar = e.statusBarHeight + 50;
- }
- }
- });
- },
- globalData: {
- userInfo: null
- }
- })
|