|
|
@@ -15,12 +15,17 @@ export default {
|
|
|
uuid: this.$route.params.uuid
|
|
|
}
|
|
|
},
|
|
|
- fetch ({ store, params }) {
|
|
|
- return Promise.all([
|
|
|
- store.dispatch('shop/findStoreInfoFromUuid', params),
|
|
|
- store.dispatch('shop/findRecommendProducts', params),
|
|
|
- store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
|
|
|
- ])
|
|
|
+ fetch ({ store, params, redirect }) {
|
|
|
+ if (!params.uuid) {
|
|
|
+ return redirect('/error')
|
|
|
+ }
|
|
|
+ if (params.uuid && params.uuid !== '') {
|
|
|
+ return Promise.all([
|
|
|
+ store.dispatch('shop/findStoreInfoFromUuid', params),
|
|
|
+ store.dispatch('shop/findRecommendProducts', params),
|
|
|
+ store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
|
|
|
+ ])
|
|
|
+ }
|
|
|
},
|
|
|
async asyncData ({ params }) {
|
|
|
// asyncData ({ params }) {
|