|
@@ -0,0 +1,30 @@
|
|
|
+import * as httpUtil from "./utils/httpUtil";
|
|
|
+import $checkRes from './utils/checkRes';
|
|
|
+App({
|
|
|
+ onLaunch() {
|
|
|
+ // 登录
|
|
|
+ wx.login({
|
|
|
+ success: res => {
|
|
|
+ // console.log(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度
|
|
|
+ wx.getSystemInfo({
|
|
|
+ success: (res) => {
|
|
|
+ let data = res;
|
|
|
+ data.getMenu = wx.getMenuButtonBoundingClientRect();
|
|
|
+ this.globalData.client = data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ globalData: {
|
|
|
+ serverUrl: "http://127.0.0.1:10102",
|
|
|
+ wechatUrl: 'https://broadcast.waityou24.cn',
|
|
|
+ // 当前设备信息
|
|
|
+ client: {},
|
|
|
+ // 微信用户openid,sessionKey
|
|
|
+ wxInfo: {},
|
|
|
+ },
|
|
|
+ ...httpUtil,
|
|
|
+ $checkRes
|
|
|
+})
|