home.vue 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. </div>
  9. </template>
  10. <script>
  11. import { RecommendStore, ExcellentSuppliers, HotCommodity } from '~components/provider'
  12. export default{
  13. layout: 'main',
  14. fetch ({ store }) {
  15. return Promise.all([
  16. store.dispatch('loadBanners', {type: 'Agent'}),
  17. store.dispatch('provider/loadSalesStore', { isOriginal: false }),
  18. store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
  19. store.dispatch('provider/loadRecommendStores', { types: 'AGENCY-DISTRIBUTION', num: 5 }),
  20. store.dispatch('provider/loadHotComponents')
  21. ])
  22. },
  23. components: {
  24. RecommendStore,
  25. ExcellentSuppliers,
  26. HotCommodity
  27. }
  28. }
  29. </script>
  30. <style scoped>
  31. .container{
  32. padding:0;
  33. }
  34. .banner-img {
  35. margin-bottom: -8px;
  36. }
  37. </style>