app.js 723 B

1234567891011121314151617181920212223242526
  1. // app.js
  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. serverUrl: "https://broadcast.waityou24.cn",
  21. // 当前设备信息
  22. client: {},
  23. // 微信用户openid,sessionKey
  24. wxInfo: {},
  25. }
  26. })