app.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // import "./__antmove/component/componentClass.js";
  2. import './vant-aliapp/__antmove/component/componentClass.js';
  3. my.global = {};
  4. const _my = require("./__antmove/api/index.js")(my);
  5. const wx = _my;
  6. // app.js
  7. App({
  8. data: {
  9. roomInfo: null, //会议室详情 home.js中到/pages/meeting/detail/的跳链,
  10. roomContentInfo: null, //我的会议-详情 /pages/meeting/detail.js中到 /pages/meeting/appointmentDetail/index的跳链
  11. meettingInfo: null, ///pages/meeting/detail.js中到/pages/meeting/subscribe/index的跳链
  12. renewalInfo: null,// 会议续约详情 pages/myRenewalContract/detail/index
  13. tranInfo: null,// 会议转让详情 pages/myTransfer/detail/index
  14. orderMealInfo:null,//会议服务 pages/orderMeal/index/index
  15. },
  16. onLaunch(options) {
  17. // console.log(11111);
  18. // console.log(options, 77);
  19. // console.log(options.query, 88);
  20. if (options.query && options.query.adminId) {
  21. this.globalData.adminId = options.query.adminId
  22. console.log(this.globalData.adminId);
  23. my.reLaunch({
  24. url: '/pages/home/home',
  25. })
  26. }
  27. // 展示本地存储能力
  28. const logs = wx.getStorageSync("logs") || [];
  29. logs.unshift(Date.now());
  30. wx.setStorageSync("logs", logs); // 登录
  31. // wx.login({
  32. // success: res => {
  33. // // 发送 res.code 到后台换取 openId, sessionKey, unionId
  34. // wx.setStorageSync("wxCode", res.code);
  35. // console.log(res, 666);
  36. // }
  37. // });
  38. //获取胶囊按钮位置信息
  39. wx.getSystemInfo({
  40. success: e => {
  41. this.globalData.StatusBar = e.statusBarHeight;
  42. let capsule = wx.getMenuButtonBoundingClientRect();
  43. if (capsule) {
  44. this.globalData.Custom = capsule;
  45. this.globalData.CustomBar =
  46. capsule.bottom + capsule.top - e.statusBarHeight;
  47. } else {
  48. this.globalData.CustomBar = e.statusBarHeight + 50;
  49. }
  50. }
  51. });
  52. },
  53. globalData: {
  54. userInfo: null,
  55. adminId: null
  56. }
  57. });