getters.js 525 B

123456789101112
  1. const getters = {
  2. token: state => state.user.token,
  3. avatar: state => state.user.avatar || 'https://matchexpo.obs.cn-north-1.myhuaweicloud.com/common/2022/0225/62189585b166b.png',
  4. user: state => state.user.user,
  5. baseApi: state => process.env.BASE_API,
  6. loading: state => state.app.loading,
  7. ossDomain: state => state.app.ossDomain,
  8. locale: state => state.app.locale,
  9. version: state => process.env.VERSION ?? '0.02',
  10. website_url: state => 'https://mp-test-onlinecatelogue.matchexpo.cn'
  11. }
  12. export default getters