home.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <!-- 轮播及店铺推荐 -->
  4. <recommend-store/>
  5. <img class="banner-img" src="/images/all/banner-agency.jpg" alt="">
  6. <excellent-suppliers :isShowMore="true"/>
  7. <hot-commodity/>
  8. <img class="banner-img" src="/images/all/banner-agency2.jpg" alt="" style="margin: 63px auto 43px;">
  9. </div>
  10. </template>
  11. <script>
  12. import { RecommendStore, ExcellentSuppliers, HotCommodity } from '~components/provider'
  13. export default{
  14. layout: 'main',
  15. fetch ({ store }) {
  16. return Promise.all([
  17. store.dispatch('loadBanners', {type: 'Agent'}),
  18. store.dispatch('provider/loadSalesStore', { isOriginal: false }),
  19. store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
  20. store.dispatch('provider/loadRecommendStores', { types: 'AGENCY-DISTRIBUTION', num: 5 }),
  21. store.dispatch('provider/loadHotComponents'),
  22. store.dispatch('loadStoreStatus', { op: 'check' })
  23. ])
  24. },
  25. components: {
  26. RecommendStore,
  27. ExcellentSuppliers,
  28. HotCommodity
  29. }
  30. }
  31. </script>
  32. <style scoped>
  33. .container{
  34. padding:0;
  35. }
  36. .banner-img {
  37. margin-bottom: -8px;
  38. }
  39. </style>