From 2b48fca98b16c5ce61a52ae6109669762858860f Mon Sep 17 00:00:00 2001 From: lmj <3407000732@qq.com> Date: Sat, 15 Oct 2022 11:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/followList.vue | 38 ++++++++++++++++---------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/components/HomePage/followList.vue b/src/components/HomePage/followList.vue index 9913eea3..39064abd 100644 --- a/src/components/HomePage/followList.vue +++ b/src/components/HomePage/followList.vue @@ -135,17 +135,7 @@ import apiUser from "@/api/system/user.js"; this.pageId = this.$xpage.getHomeId(this.$route); }, methods:{ - handleSizeChange(val) { - this.page.pageSize = val; - this.page.pageIndex = 1; - this.getPage() - this.getMyPage() - }, - handleCurrentChange(val) { - this.page.pageIndex = val; - this.getPage() - this.getMyPage() - }, + cancel(item) { apiFollow.remove(item.followId).then(res=>{ if(res.status == 200) { @@ -158,19 +148,36 @@ import apiUser from "@/api/system/user.js"; tagTab(num) { this.active = num; if(num == 1) { - if(this.followList.length==0){ this.getPage() - } + + // if(this.followList.length==0){ + // this.getPage() + // } } else { - if(this.mypageList.length==0){ this.getMyPage() - } + + // if(this.mypageList.length==0){ + // this.getMyPage() + // } } }, + handleSizeChange(val) { + this.page.pageSize = val; + this.page.pageIndex = 1; + this.getPage() + this.getMyPage() + }, + handleCurrentChange(val) { + this.page.pageIndex = val; + this.getPage() + this.getMyPage() + }, getMyPage() {//关注我的,关注他的 this.page.aid = this.pageId; apiFollow.mypage(this.page).then(res=>{ + this.page.count = res.result.count; + if(res.status== 200) { this.page.count = res.result.count; res.result.list.forEach(item=>{ @@ -185,6 +192,7 @@ import apiUser from "@/api/system/user.js"; getPage() { //我关注的,他关注的 this.page.aid = this.pageId; apiFollow.page(this.page).then(res=>{ + this.page.count = res.result.count; if(res.status== 200) { this.page.count = res.result.count; res.result.list.forEach(item=>{