app_20230316083533.js 881 B

123456789101112131415161718192021222324252627282930
  1. import * as httpUtil from "./utils/httpUtil";
  2. import $checkRes from './utils/checkRes';
  3. App({
  4. onLaunch() {
  5. // 登录
  6. wx.login({
  7. success: res => {
  8. // console.log(res);
  9. }
  10. })
  11. //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度
  12. wx.getSystemInfo({
  13. success: (res) => {
  14. let data = res;
  15. data.getMenu = wx.getMenuButtonBoundingClientRect();
  16. this.globalData.client = data;
  17. }
  18. })
  19. },
  20. globalData: {
  21. serverUrl: "http://127.0.0.1:10102",
  22. wechatUrl: 'https://broadcast.waityou24.cn',
  23. // 当前设备信息
  24. client: {},
  25. // 微信用户openid,sessionKey
  26. wxInfo: {},
  27. },
  28. ...httpUtil,
  29. $checkRes
  30. })