getters.js 430 B

123456789101112131415
  1. // import config from '@/common/config.js'
  2. export default {
  3. userInfo: state => state.app.userInfo || {},
  4. // 是否登录
  5. isLogin: state => {
  6. // return uni.getStorageSync(config.const.access_token)
  7. if(state.app.userInfo && Object.keys(state.app.userInfo).length > 0) {
  8. return true
  9. }
  10. return false
  11. },
  12. date2TimeStr: state => state.app.data2Time || '',
  13. photosSyncStr: state => state.app.photosSync || ''
  14. }