123456789101112131415161718192021222324252627282930313233343536373839 |
- 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: {},
- // 地图,地图key,长春市坐标
- mapInfo: {
- key: "IORBZ-AWV3K-GX4JE-AMZVL-B3P52-XZBW6",
- latitude: 43.88,
- longitude: 125.35,
- referer: 'VCOO生鲜购物'
- },
- // 数据请求接口域名
- publicUrl: 'https://broadcast.waityou24.cn',//http://192.168.1.197:14001 https://broadcast.waityou24.cn
- //图片请求接口域名
- fileUrl: "http://broadcast.waityou24.cn",
- },
- ...httpUtil
- })
|