C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
970 B

  1. let config = require("./config/config.js");
  2. const Http = require("./utils/HttpBasics");
  3. App({
  4. data: {},
  5. onLaunch: function(options) {
  6. console.log("onUnload ")
  7. var that = this;
  8. that.globalData.sceneAddress = options.scene;
  9. },
  10. /**
  11. * 获取地址位置信息
  12. */
  13. getLocation: function() {
  14. var that = this
  15. wx.getLocation({
  16. type: "wgs84",
  17. success: function(res) {
  18. that.globalData.locationInfo = res;
  19. },
  20. fail: error => {
  21. console.log(error);
  22. }
  23. });
  24. },
  25. globalData: {
  26. // token
  27. token: null,
  28. // 渠道
  29. sceneAddress: null,
  30. // location info
  31. locationInfo: null,
  32. // 二维码参数
  33. scene: null,
  34. // 支持智慧停车, 用户名下有车
  35. phone: null,
  36. supportCar: false,
  37. parkVendor: 1, // 1: ETCP, 2: TJD
  38. // ETCP token
  39. etcpToken: null,
  40. carLogin: false,
  41. // 当前商场信息
  42. market: {
  43. name: "陕西大悦城"
  44. }
  45. }
  46. });