12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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)
- }
- }
- })
- }
- }
- })
- },
- onShow:function(){
- },
- globalData: {
- userInfo: null,
- isLogin: false,
- token:'',
- }
- })
|