1234567891011121314151617181920212223242526272829 |
- App({
- onLaunch: function () {
-
- wx.getSetting({
- success: res => {
- if (res.authSetting['scope.userInfo']) {
-
- wx.getUserInfo({
- success: res => {
-
- console.log("app.js:"+res.userInfo)
- this.globalData.userInfo = res.userInfo
- this.globalData.login = false
-
-
- if (this.userInfoReadyCallback) {
- this.userInfoReadyCallback(res)
- }
- }
- })
- }
- }
- })
- },
- globalData: {
- userInfo: null
- }
- })
|