mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
提交
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user