default.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. console.log(path)
  27. if (path.startsWith('/help/helpList/')) {
  28. return this.helpTitle.item + '-优软商城'
  29. } else if (path.startsWith('/help/helpDetail')) {
  30. return this.helpDetail.title + '-优软商城'
  31. } else if (path.startsWith('/help')) {
  32. return '帮助中心-优软商城'
  33. } else {
  34. return '【优软商城】IC电子元器件现货采购交易平台商城'
  35. }
  36. },
  37. helpTitle () {
  38. return this.$store.state.help.title.data
  39. },
  40. helpDetail () {
  41. return this.$store.state.help.detail.data
  42. }
  43. }
  44. }
  45. </script>