From afdbbee042703d1e07e04d0d5513cb4fa8e5e88c Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Fri, 30 Jun 2023 07:59:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/components/sh-hot-goods.vue | 9 ++++++++- pages/index/index.vue | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) 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 @@