app.js 738 B

1234567891011121314151617181920212223242526272829303132333435
  1. //app.js
  2. import WxAuthor from './utils/WxAuthor'
  3. App({
  4. onLaunch: function () {
  5. let self = this;
  6. // 登录
  7. new WxAuthor(self)
  8. },
  9. globalData: {
  10. userId: {
  11. openid: '',
  12. unionid: ''
  13. },
  14. userInfo: null,
  15. defaultAddress: null,
  16. fcodeErr: '',
  17. backLogin: false,
  18. arrayTree: [],
  19. fromSource: ''
  20. },
  21. setFromSource(fromSource) {
  22. this.globalData.fromSource = fromSource
  23. },
  24. checkDefaultAddress(address) {
  25. this.globalData.defaultAddress = address
  26. },
  27. clearAddress() {
  28. this.globalData.defaultAddress = null
  29. },
  30. setArrayTree(tree) {
  31. this.globalData.arrayTree = tree
  32. }
  33. })