🐛 fix query is not defined

This commit is contained in:
ronger 2022-10-11 11:13:49 +08:00
parent ba4fb305ae
commit 2b10747e97
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export default {
name: "Portfolios", name: "Portfolios",
components: {PortfolioList}, components: {PortfolioList},
fetch() { fetch() {
let {store, params, error} = this.$nuxt.context let {store, query, error} = this.$nuxt.context
return Promise.all([ return Promise.all([
store store
.dispatch('portfolio/fetchList', {page: query.page || 1}) .dispatch('portfolio/fetchList', {page: query.page || 1})

View File

@ -14,7 +14,7 @@ export default {
name: "products", name: "products",
components: {ProductList}, components: {ProductList},
fetch() { fetch() {
let {store, params, error} = this.$nuxt.context let {store, query, error} = this.$nuxt.context
return Promise.all([ return Promise.all([
store store
.dispatch('product/fetchList', {page: query.page || 1}) .dispatch('product/fetchList', {page: query.page || 1})