index.vue 888 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <div class="repairs">
  3. <banner/>
  4. <service-list/>
  5. </div>
  6. </template>
  7. <script>
  8. import { Carousel } from '@/components/home'
  9. import { ServiceList, Banner } from '@/components/service'
  10. export default {
  11. name: 'Repairs',
  12. layout: 'town',
  13. fetch ({ store }) {
  14. return Promise.all([
  15. store.dispatch('loadServiceList', { kind: 'cc', client_type: 'cc', cityId: store.state.option.user.data.currentCity ? store.state.option.user.data.currentCity.id : null}),
  16. store.dispatch('loadCarouselInfo', { client_type: 'cc', cityId: store.state.option.user.data.currentCity ? store.state.option.user.data.currentCity.id : null})
  17. ])
  18. },
  19. components: {
  20. Carousel,
  21. ServiceList,
  22. Banner
  23. },
  24. computed: {
  25. bannerData () {
  26. return this.$store.state.carouselInfo.infoData.data.serve
  27. }
  28. }
  29. }
  30. </script>