_code.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="details">
  3. <div class="information">
  4. <brand-detail/>
  5. <div class="comm-list" v-if="true">
  6. <categories-list :isShow="isShow"></categories-list>
  7. <brand-component @showEvent="showList"></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: 'default',
  16. data () {
  17. return {
  18. code: '',
  19. isShow: 0
  20. }
  21. },
  22. components: {
  23. BrandDetail,
  24. CategoriesList,
  25. BrandComponent
  26. },
  27. fetch ({ store, params }) {
  28. return Promise.all([
  29. store.dispatch('loadBrandDetail', { id: params.code }),
  30. store.dispatch('product/loadSupplierInformation', { uuid: params.code, count: 5, page: 1 })
  31. ])
  32. },
  33. methods: {
  34. showList: function (status) {
  35. this.isShow = status
  36. },
  37. listenChild: function (brand) {
  38. this.$store.dispatch('loadBrandPages', {count: 10, filter: { brandid: brand.id }, page: brand.page})
  39. }
  40. }
  41. }
  42. </script>
  43. <style scoped>
  44. .comm-list{
  45. width: 1190px;
  46. margin: 0 auto;
  47. overflow: hidden;
  48. }
  49. </style>