home.vue 850 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div>
  3. <!-- 轮播及店铺推荐 -->
  4. <recommend-store/>
  5. <excellent-suppliers :isShowMore="true"/>
  6. <hot-commodity/>
  7. </div>
  8. </template>
  9. <script>
  10. import { RecommendStore, ExcellentSuppliers, HotCommodity } from '~components/provider'
  11. export default{
  12. layout: 'main',
  13. fetch ({ store }) {
  14. return Promise.all([
  15. store.dispatch('loadBanners', {type: 'Agent'}),
  16. store.dispatch('provider/loadSalesStore', { isOriginal: false }),
  17. store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
  18. store.dispatch('provider/loadRecommendOriginal', { types: 'AGENCY,DISTRIBUTION' }),
  19. store.dispatch('provider/loadHotComponents')
  20. ])
  21. },
  22. components: {
  23. RecommendStore,
  24. ExcellentSuppliers,
  25. HotCommodity
  26. }
  27. }
  28. </script>
  29. <style>
  30. .container{
  31. padding:0;
  32. }
  33. </style>