_code.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. console.log(status)
  36. this.isShow = status
  37. },
  38. listenChild: function (brand) {
  39. this.$store.dispatch('loadBrandPages', {count: 10, filter: { brandid: brand.id }, page: brand.page})
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped>
  45. .comm-list{
  46. width: 1190px;
  47. margin: 0 auto;
  48. overflow: hidden;
  49. }
  50. </style>