base.js 823 B

123456789101112131415161718192021222324252627282930313233
  1. import { mapState } from "vuex";
  2. export default {
  3. data() {
  4. return {
  5. componentName: '',
  6. theme: 'theme-mall',
  7. };
  8. },
  9. computed: {
  10. ...mapState({
  11. custTypeId: (state) => state.custTypeId,
  12. source: (state) => state.source,
  13. }),
  14. },
  15. mounted() {
  16. const com = ['purpleCom', 'blueCom', 'greenCom', 'officeBlueCom', 'purpleCom'];
  17. if ( this.custTypeId < 3 || !this.custTypeId) {
  18. this.componentName = 'baseParkingFeeCom';
  19. this.theme = 'theme-mall'
  20. } else {
  21. this.componentName = com[this.custTypeId];
  22. this.theme = 'theme-office'
  23. }
  24. if ( this.source === 'KIP' ) {
  25. this.theme = 'theme-office'
  26. }
  27. this.theme = 'theme-office'
  28. // TODO: 根据lbsId动态切换
  29. // this.theme = 'theme-pudong'
  30. // this.theme = 'theme-jingan'
  31. },
  32. }