diff --git a/src/api/phase2/userfollow.js b/src/api/phase2/userfollow.js index 91b4aafd..19071737 100644 --- a/src/api/phase2/userfollow.js +++ b/src/api/phase2/userfollow.js @@ -43,7 +43,7 @@ const page=function (query){ } /** - * 我关注的人列表 + * 关注我的人列表 * @param{ * pageIndex * pageSize, diff --git a/src/components/Follow/button.vue b/src/components/Follow/button.vue index 46fb37e0..6c60816d 100644 --- a/src/components/Follow/button.vue +++ b/src/components/Follow/button.vue @@ -51,14 +51,15 @@ watch:{ has(newVal,oldVal){ this.has=newVal; + console.log(newVal,oldVal,'测试问题'); this.hasFollow=newVal; if(newVal!=oldVal && this.auto){ this.autoCheck(); } }, - aid(newVal){ - this.aid=newVal; + aid(newVal,oldVal){ + //this.aid=newVal; } }, methods: { @@ -112,22 +113,21 @@ apiUser.getByIds([this.aid]).then(rs => { if (res.status == 200) { let data = { - has:true, - userFollow:{ - aid:res.result.aid, - followId:res.result.followId, - followTime:res.result.followTime, - id:res.result.id, - authorInfo:rs.result[0], + has:true, + userFollow:{ + aid:res.result.aid, + followId:res.result.followId, + followTime:res.result.followTime, + id:res.result.id, + authorInfo:rs.result[0], + } } - - } - $this.$emit('add',data); + $this.$emit('add',data); } else { this.$message.error(res.message); } }); - + } } else { $this.$message.error("关注失败:"+res.message); diff --git a/src/components/HomePage/followList.vue b/src/components/HomePage/followList.vue index b55fee7d..ba4c0a5a 100644 --- a/src/components/HomePage/followList.vue +++ b/src/components/HomePage/followList.vue @@ -1,8 +1,8 @@