123456789101112131415161718192021222324252627282930313233343536373839 |
- App({
- onLaunch: function () {
-
- var logs = wx.getStorageSync('logs') || []
- logs.unshift(Date.now())
- wx.setStorageSync('logs', logs)
-
- wx.login({
- success: res => {
-
- }
- })
-
- wx.getSetting({
- success: res => {
- if (res.authSetting['scope.userInfo']) {
-
- wx.getUserInfo({
- success: res => {
-
- this.globalData.userInfo = res.userInfo
-
-
- if (this.userInfoReadyCallback) {
- this.userInfoReadyCallback(res)
- }
- }
- })
- }
- }
- })
- },
- globalData: {
- userInfo: null
- }
- })
|