_uuid.vue 800 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div>
  3. <store-header></store-header>
  4. <commodity-list></commodity-list>
  5. <store-footer></store-footer>
  6. </div>
  7. </template>
  8. <script>
  9. import {
  10. CommodityList,
  11. StoreHeader,
  12. StoreFooter
  13. } from '~components/mobile/share'
  14. export default {
  15. layout: 'mobileStore',
  16. fetch({ store, params, redirect }) {
  17. if (!params.uuid) {
  18. return redirect('/error')
  19. }
  20. return Promise.all([
  21. store.dispatch('shop/findStoreInfoFromUuid', params),
  22. store.dispatch('shop/mobilePageCommoditiesOfStore', {
  23. storeid: params.uuid,
  24. origin: 'store',
  25. page: 1,
  26. count: 10
  27. })
  28. ])
  29. },
  30. components: {
  31. CommodityList,
  32. StoreHeader,
  33. StoreFooter
  34. }
  35. }
  36. </script>
  37. <style scoped lang="scss">
  38. @import '~assets/scss/mobileCommon';
  39. </style>