Home.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div>
  3. <common @asynCallBack="asynCallBack" :projectCheck="false"></common>
  4. </div>
  5. </template>
  6. <script>
  7. import * as Dictionaries from '$project/utils/dictionaries'
  8. import Common from '$project/components/Common.vue'
  9. import {
  10. mapGetters,
  11. mapMutations
  12. } from 'vuex'
  13. export default {
  14. name: 'Home',
  15. components: {
  16. Common,
  17. },
  18. data() {
  19. return {}
  20. },
  21. created() {},
  22. methods: {
  23. asynCallBack() {
  24. //登录状态判断
  25. if (this.person_popedom) {
  26. let project = Dictionaries.getProject(this.person_popedom.sceneId);
  27. setTimeout(function() {
  28. window.location.href = '../' + project + '/#/master';
  29. }, 1000);
  30. } else {
  31. window.location.href="http://xpgj.xiaoxinda.com/xpgj/prod/home/#/select"
  32. // this.$router.push({
  33. // name: 'Select',
  34. // })
  35. // if (process.env.VUE_APP_NODE_NAME == 'production') {
  36. // window.location.href = 'http://xpgj.xiaoxinda.com/xpgj/prod/home/#/select';
  37. // }else{
  38. // window.location.href = 'http://xpgj.xiaoxinda.com/#/select';
  39. // }
  40. }
  41. },
  42. },
  43. mounted() {},
  44. destroyed() {
  45. },
  46. computed: {
  47. ...mapGetters({
  48. openId: 'wx_openid',
  49. token: 'token',
  50. person_data: 'person_data',
  51. person_popedom: 'person_popedom',
  52. })
  53. }
  54. }
  55. </script>
  56. <style src="$project/assets/css/iconfont.css"></style>
  57. <style scoped src="$project/assets/css/xpwyfyy.css"></style>
  58. <style scoped>
  59. </style>