From 235f4127be373f71111326dd740e75c33f887d3a Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 17 Mar 2023 13:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=B8=96=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/fengdu/AppCircle/MyPostList.vue | 27 ++++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/project/fengdu/AppCircle/MyPostList.vue b/src/project/fengdu/AppCircle/MyPostList.vue index e0f8d8b..db4975d 100644 --- a/src/project/fengdu/AppCircle/MyPostList.vue +++ b/src/project/fengdu/AppCircle/MyPostList.vue @@ -129,7 +129,8 @@ data () { return { - currIndex: 2 + currIndex: 2, + totalInfo: {} } }, @@ -138,10 +139,28 @@ }, methods: { - + getTotal() { + this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => { + if (res.code === 0 && res.data) { + const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records + this.pages = Math.ceil(res.data.total / 10) + this.list = list + } + }) + }, + getList() { + this.$instance.post(`/app/appneighborhoodassistancetheme/list¤t=${this.current}&size=20`).then(res => { + if (res.code === 0 && res.data) { + const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records + this.pages = Math.ceil(res.data.total / 10) + this.list = list + } + }) + } }, - onShow() { - + onLoad() { + this.getTotal() + this.getList() }, }