index.vue 880 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="supplier">
  3. <!--<carousel>-->
  4. <!--<kind-category @loadchild="loadProductKinds"></kind-category>-->
  5. <!--</carousel>-->
  6. <banner/>
  7. <merchant-view/>
  8. </div>
  9. </template>
  10. <script>
  11. import { KindCategory, Carousel } from '~components/home'
  12. import { MerchantView, Banner } from '~components/supplier'
  13. export default {
  14. name: 'SupplierView',
  15. layout: 'main',
  16. fetch ({store}) {
  17. return Promise.all([
  18. store.dispatch('supplier/loadVendorList', {page: 1, size: 20}),
  19. store.dispatch('loadBanners', {type: 'home'}),
  20. store.dispatch('loadProductKinds', { id: 0 })
  21. ])
  22. },
  23. components: {
  24. KindCategory,
  25. Carousel,
  26. MerchantView,
  27. Banner
  28. },
  29. methods: {
  30. loadProductKinds (id) {
  31. this.$store.dispatch('loadAllProductKinds', {id})
  32. }
  33. }
  34. }
  35. </script>