import * as httpUtil from "./utils/httpUtil";
import $checkRes from './utils/checkRes'
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',//https://broadcast.waityou24.cn
    //图片请求接口域名
    fileUrl: "https://broadcast.waityou24.cn",
    // 微信路由前缀
    wechatPrefix: '/wechat/api/',
    // 业务路由前缀
    prefix: '/newCourt/api'
  },
  ...httpUtil,
  $checkRes
})
