12345678910111213141516171819202122232425262728293031 |
- import * as httpUtil from "./utils/httpUtil";
- const app = getApp();
- App({
- onLaunch() {
- // 展示本地存储能力
- const logs = wx.getStorageSync('logs') || []
- logs.unshift(Date.now())
- wx.setStorageSync('logs', logs)
- //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度
- wx.getSystemInfo({
- success: (res) => {
- let data = res;
- data.getMenu = wx.getMenuButtonBoundingClientRect();
- this.globalData.client = data;
- }
- })
- },
- globalData: {
- userInfo: {},
- // 微信用户openid,sessionKey
- wxInfo: {},
- client: {},
- publicUrl: 'https://broadcast.waityou24.cn',//http://127.0.0.1:12001
- // 图片请求接口
- fileUrl: "http://broadcast.waityou24.cn",
- // 图片显示接口
- imageUrl: "http://broadcast.waityou24.cn",
- },
- ...httpUtil
- })
|