From 8f7305e83559812cb43de48c7fa76715881b2a76 Mon Sep 17 00:00:00 2001 From: linfeng <2445465217@qq.com> Date: Sun, 15 Jan 2023 15:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/my/post.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/my/post.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/my/post.vue index 903c952..040b3dc 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/my/post.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/my/post.vue @@ -15,27 +15,27 @@ postList: [], loadStatus: "loading", page: 1, - type: 1,//1 点赞帖子 2 我的帖子 + type: 1, //1 点赞帖子 2 我的帖子 }; }, onLoad(options) { - this.type=options.type - if(options.type==1){ + this.type = options.type + if (options.type == 1) { this.getCollectPostList(); - }else if(options.type==2){ + } else if (options.type == 2) { this.getMyPostList(); } - + }, onReachBottom() { - if(this.type==1){ + if (this.type == 1) { this.page++; this.getCollectPostList(); - }else if(this.type==2){ + } else if (this.type == 2) { this.page++; this.getMyPostList(); } - + }, methods: { @@ -44,16 +44,16 @@ this.$H.get('post/myCollectPost', { page: this.page }).then(res => { - if(res.result.data){ + if (res.result.data) { this.postList = this.postList.concat(res.result.data); if (res.result.current_page >= res.result.total || res.result.last_page === 0) { this.loadStatus = "nomore"; } else { this.loadStatus = "loadmore" } - }else{ + } else { this.loadStatus = "nomore"; - } + } }) }, getMyPostList() {