数字化园区前端项目
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div id="app">
  3. <router-view></router-view>
  4. <custom-service v-show="!doBotNeedCustomerService.includes(path)"></custom-service>
  5. </div>
  6. </template>
  7. <script>
  8. import CustomService from "@components/CustomService.vue";
  9. // @ is an alias to /src
  10. export default {
  11. name: "Home",
  12. components: { CustomService },
  13. computed: {},
  14. watch: {
  15. $route(to, from) {
  16. this.path = to.path;
  17. },
  18. },
  19. data() {
  20. return {
  21. doBotNeedCustomerService: ["/login"], // 不需要引用客服的页面
  22. path: "",
  23. };
  24. },
  25. created() {
  26. this.$store.dispatch("getUserInfo");
  27. this.$store.dispatch("getAllPickListByEntity");
  28. this.path = this.$route.path;
  29. },
  30. methods: {},
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. #app {
  35. position: relative;
  36. }
  37. </style>