default.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div id="app">
  3. <header-view></header-view>
  4. <nuxt/>
  5. <footer-view></footer-view>
  6. <right-bar></right-bar>
  7. </div>
  8. </template>
  9. <script>
  10. import { Header, Footer, RightBar } from '~components/default'
  11. export default {
  12. name: 'app',
  13. components: {
  14. HeaderView: Header,
  15. FooterView: Footer,
  16. RightBar
  17. },
  18. head () {
  19. return {
  20. title: this.title
  21. }
  22. },
  23. computed: {
  24. title () {
  25. let path = this.$route.path
  26. if (path.startsWith('/help/helpList/')) {
  27. return this.helpTitle.item + '-优软商城'
  28. } else if (path.startsWith('/help/helpDetail')) {
  29. return this.helpDetail.title + '-优软商城'
  30. } else if (path.startsWith('/help')) {
  31. return '帮助中心-优软商城'
  32. } else {
  33. return '【优软商城】IC电子元器件现货采购交易平台商城'
  34. }
  35. },
  36. helpTitle () {
  37. return this.$store.state.help.title.data
  38. },
  39. helpDetail () {
  40. return this.$store.state.help.detail.data
  41. }
  42. }
  43. }
  44. </script>