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

    <img class="banner-img" src="/images/all/banner-agency.jpg" alt="">

    <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 scoped>
  .container{
    padding:0;
  }
  .banner-img {
    margin-bottom: -8px;
  }
</style>
