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.

17 lines
455 B

3 years ago
  1. import actions from './actions.js'
  2. import mutations from './mutations.js'
  3. export default {
  4. namespaced: true,
  5. state: {
  6. token: null,
  7. userInfo: null,
  8. config: null
  9. },
  10. getters: {
  11. token: state => state.token || uni.getStorageSync('token'),
  12. userInfo: state => state.userInfo || uni.getStorageSync('userInfo') || {},
  13. config: state => state.config || uni.getStorageSync('config') || {}
  14. },
  15. actions,
  16. mutations
  17. }