_code.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div class="details">
  3. <div class="information">
  4. <brand-detail/>
  5. <div class="comm-list">
  6. <categories-list/>
  7. <brand-component/>
  8. </div>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import { BrandDetail, CategoriesList, BrandComponent } from '~components/product'
  14. export default {
  15. layout: 'main',
  16. data () {
  17. return {
  18. code: ''
  19. }
  20. },
  21. components: {
  22. BrandDetail,
  23. CategoriesList,
  24. BrandComponent
  25. },
  26. fetch ({ store, params }) {
  27. return Promise.all([
  28. store.dispatch('loadBrandDetail', { id: params.code }),
  29. store.dispatch('product/loadSupplierInformation', { uuid: params.code, count: 10, page: 1 })
  30. ])
  31. },
  32. methods: {
  33. listenChild: function (brand) {
  34. this.$store.dispatch('loadBrandPages', {count: 10, filter: { brandid: brand.id }, page: brand.page})
  35. }
  36. }
  37. }
  38. </script>
  39. <style scoped>
  40. .comm-list{
  41. width: 1190px;
  42. margin: 0 auto;
  43. overflow: hidden;
  44. }
  45. </style>