// app.js var restAjax = require('utils/restAjax.js'); App({ restAjax: restAjax, apis: restAjax.apis, baseUrls: restAjax.baseUrl, onLaunch() { this.globalData.windowHeight = wx.getSystemInfoSync().windowHeight //设置状态栏 wx.getSystemInfo({ success: e => { this.globalData.StatusBar = e.statusBarHeight; let capsule = wx.getMenuButtonBoundingClientRect(); if (capsule) { this.globalData.Custom = capsule; this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight; } else { this.globalData.CustomBar = e.statusBarHeight + 50; } } }) }, // 获取用户信息 getUserInfo: function () { var self = this app.restAjax.get(app.restAjax.path('{loginUrl}app/user/get-app-user', [app.personIntroUrl]), {}, { headers: { token: app.globalData.token } }, function (code, data) { app.globalData.userInfo = data }, function (code, data) { app.dialog.msg(data.msg); }); }, globalData: { userInfo: null, bindPhone: '', token: 'cVJWWXQ1UWpQWTQ1TDZMbEVtTmxiMlJVNkdvTzUwSTNHYzZaK3VTZmF0RXNITnQ3RXUxZ2F6eVU4dGpZWjFqWm5Pc0Fqd2l6MzAvMlZSckZaTkZITFZmVXk4YVNWVVErcEJ5SGZzVFRGeGFEenBMaDhZU0FFc1hnZ2RGc2hLUWZvMTJtWHRkcENmWThROTZFL2d5WDJxc0RBY2RzUkUzUzIyNlBmblFhUGdPZWdFY3JOeU5mME5veEk1aVU4a1hNMFNlaW1BemFwRjhRbXVRUUt1MTlObEViSTlhMUVoSEJDZ2ZFVTFYZlJNNGFoMTVOTXgyYytBdE96SUVmWmpYRQ==' } })