diff --git a/pages/index/components/sh-hot-goods.vue b/pages/index/components/sh-hot-goods.vue index e73bf9a..29ab2e1 100644 --- a/pages/index/components/sh-hot-goods.vue +++ b/pages/index/components/sh-hot-goods.vue @@ -76,7 +76,7 @@ export default { data() { return { listParams: { - page: 1 + page: 1, }, //当前分页 lastPage: 1, //总分页 total: 0, //总商品数 @@ -100,6 +100,12 @@ export default { detail: { type: Object, default: () => {} + }, + per_page:{ + type:Number, + default:()=>{ + return 10 + } } }, created() { @@ -155,6 +161,7 @@ export default { // 商品列表 getGoodsList() { let that = this; + this.listParams.per_page = this.per_page that.$http('goods.lists', this.listParams).then(res => { if (res.code === 1) { this.lastPage = res.data.last_page; diff --git a/pages/index/index.vue b/pages/index/index.vue index 67cf8fa..ac1bf4e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -53,6 +53,7 @@