//app.js App({ release: false, httpUrl: 'http://192.168.0.106:9000', globalData: { userInfo: {}, openId: null, token: null }, onLaunch: function () { // 获取全局尺寸的一些配置 // var sysInfo = wx.getAccountInfoSync() // if (sysInfo.miniProgram.appId == 'wx9e774103645f5c54') { // this.httpUrl = 'http://192.168.0.106:9000' // } else if (sysInfo.miniProgram.appId == 'wx5371934de00d6215') { // this.httpUrl = 'https://mini.qniao.cn' // } if (this.release) { this.httpUrl = 'https://mini.qniao.cn' } else { this.httpUrl = 'http://192.168.0.106:9000' } wx.getSystemInfo({ success: e => { this.globalData.StatusBar = e.statusBarHeight; let custom = wx.getMenuButtonBoundingClientRect(); this.globalData.Custom = custom; this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight; let windowHeight = e.windowHeight * (750 / e.windowWidth); let statusBarHeight = this.globalData.CustomBar * (750 / e.windowWidth); this.globalData.fragmentHeight = windowHeight - statusBarHeight // console.log('fragmentHeight>>>' + this.globalData.fragmentHeight + ',windowHeight=' + windowHeight) } }) } })