_batchCode.vue 956 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="container commodity">
  3. <div v-if="commodity">
  4. <commodity-info />
  5. <component-info />
  6. </div>
  7. <div v-else>
  8. <error-page :title="'产品'"></error-page>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import { ComponentInfo, CommodityInfo } from '~components/store'
  14. import { ErrorPage } from '~components/error'
  15. export default {
  16. layout: 'shop',
  17. fetch({ store, route }) {
  18. return Promise.all([
  19. // store.dispatch('shop/findStoreInfoFromUuid', route.params),
  20. store.dispatch('shop/findCommodityOnBatchInfo', route.params)
  21. ])
  22. },
  23. components: {
  24. ComponentInfo,
  25. CommodityInfo,
  26. ErrorPage
  27. },
  28. computed: {
  29. commodity() {
  30. // console.log(this.$store.state.shop.storeInfo.commodity.data)
  31. return this.$store.state.shop.storeInfo.commodity.data
  32. }
  33. }
  34. }
  35. </script>
  36. <style>
  37. .container.commodity {
  38. width: 1190px;
  39. padding-left: 0px;
  40. padding-right: 0px;
  41. }
  42. </style>