This commit is contained in:
zhaofang
2022-11-18 10:38:15 +08:00
parent 63bc86aee8
commit f7e188571b

View File

@@ -157,12 +157,24 @@
})
},
toFollow(item,index) {
console.log(item,'item')
let $this=this;
apiFollow.save(item.userFollow.aid).then(res=>{
if(res.status == 200) {
$this.followMe.list[index].has = true;
// 手动把关注成功的数据push进我关注的列表
let data = {
has:true,
userFollow:{
aid:res.result.aid,
followId:res.result.followId,
followTime:res.result.followTime,
id:res.result.id,
authorInfo:item.userFollow.authorInfo,
}
}
$this.follow.list.push(data);
} else {
// this.$message.error(res.message);
}