From 275e1ac2a94543b0b2882e96c3288a3b5c2b2fb0 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Fri, 28 Oct 2022 17:14:32 +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 --- src/components/HomePage/followList.vue | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/components/HomePage/followList.vue b/src/components/HomePage/followList.vue index 17f1c56e..c6ef0b99 100644 --- a/src/components/HomePage/followList.vue +++ b/src/components/HomePage/followList.vue @@ -68,10 +68,15 @@

{{maPage.userFollow.authorInfo.sign}}

-
+ +
已关注 关注他
+
+ 取消关注 + 关注他 +
@@ -166,10 +171,22 @@ import apiUser from "@/api/system/user.js"; this.tagTab(this.active); }, cancel(item,idx) { + console.log(item,'item'); let $this=this; - apiFollow.remove(item.followId).then(res=>{ + let id = ''; + if(idx == 2) { + id = item.userFollow.aid; + } else { + id = item.userFollow.followId; + } + apiFollow.remove(id).then(res=>{ if(res.status == 200) { - this.getPage(); + if(idx == 2) { + this.getMyPage() + } else { + this.getPage(); + } + // $this.follow.list.splice(idx,1); } })