<template>
  <div class="btb-business">
    <banner/>
    <platform-service/>
    <five-features/>
    <auxiliary-means/>
  </div>
</template>
<script>
  import { Banner, PlatformService, FiveFeatures, AuxiliaryMeans } from '~components/btbBusiness'
  export default {
    name: 'btbBusiness',
    layout: 'main',
    fetch ({store}) {
      return Promise.all([
        store.dispatch('supplier/loadVendorList', {page: 1, size: 20}),
        store.dispatch('supplier/loadVendorAll', {page: 1, size: 20}),
        store.dispatch('loadBanners', {type: 'home'}),
        store.dispatch('loadProductKinds', { id: 0 })
      ])
    },
    components: {
      Banner,
      PlatformService,
      FiveFeatures,
      AuxiliaryMeans
    },
    methods: {
      loadProductKinds (id) {
        this.$store.dispatch('loadAllProductKinds', {id})
      }
    }
  }
</script>
