1234567891011121314151617181920212223242526272829303132333435 |
- //app.js
- import WxAuthor from './utils/WxAuthor'
- App({
- onLaunch: function () {
- let self = this;
- // 登录
- new WxAuthor(self)
- },
- globalData: {
- userId: {
- openid: '',
- unionid: ''
- },
- userInfo: null,
- defaultAddress: null,
- fcodeErr: '',
- backLogin: false,
- arrayTree: [],
- fromSource: ''
- },
- setFromSource(fromSource) {
- this.globalData.fromSource = fromSource
- },
- checkDefaultAddress(address) {
- this.globalData.defaultAddress = address
- },
- clearAddress() {
- this.globalData.defaultAddress = null
- },
- setArrayTree(tree) {
- this.globalData.arrayTree = tree
- }
- })
|