app.js 958 B

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