123456789101112131415161718192021222324252627282930313233343536 |
- 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)
- }
- }
- })
- }
- }
- })
-
- wx.getSystemInfo({
- success (res) {
- console.log(res.windowHeight);
- this.globalData.height = res.windowHeight;
- }
- })
- },
- globalData: {
- userInfo: null
- }
- })
|