app.js 769 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. channel: '欧耶商城'
  21. },
  22. setFromSource(fromSource) {
  23. this.globalData.fromSource = fromSource
  24. },
  25. checkDefaultAddress(address) {
  26. this.globalData.defaultAddress = address
  27. },
  28. clearAddress() {
  29. this.globalData.defaultAddress = null
  30. },
  31. setArrayTree(tree) {
  32. this.globalData.arrayTree = tree
  33. }
  34. })