<template>
  <div>
    <!-- 轮播及店铺推荐 -->
    <recommend-store/>

    <excellent-suppliers :isShowMore="true"/>

    <hot-commodity/>
  </div>
</template>
<script>
import { RecommendStore, ExcellentSuppliers, HotCommodity } from '~components/provider'

export default{
  layout: 'main',
  fetch ({ store }) {
    return Promise.all([
      store.dispatch('loadBanners', {type: 'Agent'}),
      store.dispatch('provider/loadSalesStore', { isOriginal: false }),
      store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
      store.dispatch('provider/loadRecommendStores', { types: 'AGENCY-DISTRIBUTION', num: 5 }),
      store.dispatch('provider/loadHotComponents')
    ])
  },
  components: {
    RecommendStore,
    ExcellentSuppliers,
    HotCommodity
  }
}
</script>
<style>
  .container{
    padding:0;
  }
</style>
