<template>
  <div class="repairs">
    <banner/>
    <service-list/>
  </div>
</template>

<script>
  import { Carousel } from '@/components/home'
  import { ServiceList, Banner } from '@/components/service'
  export default {
    name: 'Repairs',
    layout: 'town',
    fetch ({ store }) {
      return Promise.all([
        store.dispatch('loadServiceList', { kind: 'cc', client_type: 'cc', cityId: store.state.option.user.data.currentCity ? store.state.option.user.data.currentCity.id : null}),
        store.dispatch('loadCarouselInfo', { client_type: 'cc', cityId: store.state.option.user.data.currentCity ? store.state.option.user.data.currentCity.id : null})
      ])
    },
    components: {
      Carousel,
      ServiceList,
      Banner
    },
    computed: {
      bannerData () {
        return this.$store.state.carouselInfo.infoData.data.serve
      }
    }
  }
</script>
