| | |
| | | const store = new Vuex.Store({ |
| | | |
| | | state: { |
| | | openId: openId || '', |
| | | openId: openId || '061kuG0006hxcS13TT200w9VIp4kuG09', |
| | | member: member || null, |
| | | statusbarHeight: statusbarHeight || '0', |
| | | navHeight: navHeight || '0', |
| | |
| | | time: time || null, |
| | | userInfo: userInfo || {}, |
| | | height: height || '0', |
| | | sessionKey: sessionKey || '' |
| | | sessionKey: sessionKey || '', |
| | | primaryColor: '#279baa' |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | // 清空所有缓存 |
| | | empty(state) { |
| | | state.token = '' |
| | | state.userInfo = '' |
| | | state.userInfo = {} |
| | | uni.removeStorageSync('userInfo') |
| | | uni.removeStorageSync('token') |
| | | } |