From 1d6acd10799d0c236b160a155f654d8a97827486 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Fri, 28 Oct 2022 19:09:09 +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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/HomePage/followList.vue b/src/components/HomePage/followList.vue index 2ee43add..ed959ba8 100644 --- a/src/components/HomePage/followList.vue +++ b/src/components/HomePage/followList.vue @@ -158,7 +158,13 @@ import apiUser from "@/api/system/user.js"; this.$router.push({path:this.$xpage.getHomePath(ava.aid)}) }, toFollow(item) { - apiFollow.save(item.userFollow.aid).then(res=>{ + let id = ''; + if(this.active == 2) { + id = item.userFollow.aid; + } else { + id = item.userFollow.followId; + } + apiFollow.save(id).then(res=>{ if(res.status == 200) { // this.$message.success("关注成功"); this.getMyPage(); @@ -174,7 +180,6 @@ import apiUser from "@/api/system/user.js"; this.tagTab(this.active); }, cancel(item,idx) { - console.log(item,'item'); let $this=this; let id = ''; if(idx == 2) {