1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- let height = 0;
- 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 => {
-
- 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);
- height = res.windowHeight;
- }
- })
- },
- globalData: {
- userInfo: null,
- login:true,
- phoneHeight:height
- }
- })
|