index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div>
  3. <div class="store-banner">
  4. <store-banner @kindAction="kindAction" @kindsAction="kindsAction"></store-banner>
  5. </div>
  6. <enterprise-info :kindIds="ids" :kindItem="item"></enterprise-info>
  7. </div>
  8. </template>
  9. <script>
  10. import { EnterpriseInfo, StoreBanner } from '~components/pcb'
  11. export default {
  12. layout: 'pcb',
  13. data () {
  14. return {
  15. ids: '',
  16. item: {}
  17. }
  18. },
  19. fetch ({ store }) {
  20. return Promise.all([
  21. store.dispatch('pcb/getPcbKinds', {parentId: 3825}),
  22. store.dispatch('shop/findStoreInfoFromUuid', {uuid: process.env.pcbId}),
  23. store.dispatch('shop/findRecommendProducts', {uuid: process.env.pcbId}),
  24. store.dispatch('shop/pageCommoditiesOfStore', process.env.pcbId, { page: 1, count: 10 }),
  25. store.dispatch('loadStoreStatus', { op: 'check' })
  26. ])
  27. },
  28. components: {
  29. EnterpriseInfo,
  30. StoreBanner
  31. },
  32. methods: {
  33. kindAction (ids) {
  34. this.ids = ids || null
  35. },
  36. kindsAction(item) {
  37. this.item = item || {}
  38. }
  39. }
  40. }
  41. </script>
  42. <style>
  43. #nav_fragment .el-dialog__wrapper .el-dialog--tiny{
  44. width: 320px !important;
  45. }
  46. #nav_fragment .el-dialog__wrapper .el-dialog__body{
  47. padding: 14px !important;
  48. }
  49. .store-banner{
  50. min-width: 1190px;
  51. background: #ece9ec;
  52. padding-top: 20px;
  53. }
  54. </style>