mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
提交
This commit is contained in:
@@ -68,10 +68,15 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="portal-summary-text">{{maPage.userFollow.authorInfo.sign}}</p>
|
<p class="portal-summary-text">{{maPage.userFollow.authorInfo.sign}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
|
<div v-if="pageId == userInfo.aid">
|
||||||
<el-button class="btn" icon="el-icon-check" v-if="maPage.has">已关注</el-button>
|
<el-button class="btn" icon="el-icon-check" v-if="maPage.has">已关注</el-button>
|
||||||
<el-button type="primary" class="btn" v-else icon="el-icon-plus" @click="toFollow(maPage)">关注他</el-button>
|
<el-button type="primary" class="btn" v-else icon="el-icon-plus" @click="toFollow(maPage)">关注他</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<el-button plain class="btn" icon="el-icon-check" v-if="maPage.has" @click="cancel(maPage,2)">取消关注</el-button>
|
||||||
|
<el-button type="primary" class="btn" v-else icon="el-icon-plus" @click="toFollow(maPage)">关注他</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--分页没有加-->
|
<!--分页没有加-->
|
||||||
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
|
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
|
||||||
@@ -166,10 +171,22 @@ import apiUser from "@/api/system/user.js";
|
|||||||
this.tagTab(this.active);
|
this.tagTab(this.active);
|
||||||
},
|
},
|
||||||
cancel(item,idx) {
|
cancel(item,idx) {
|
||||||
|
console.log(item,'item');
|
||||||
let $this=this;
|
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) {
|
if(res.status == 200) {
|
||||||
this.getPage();
|
if(idx == 2) {
|
||||||
|
this.getMyPage()
|
||||||
|
} else {
|
||||||
|
this.getPage();
|
||||||
|
}
|
||||||
|
|
||||||
// $this.follow.list.splice(idx,1);
|
// $this.follow.list.splice(idx,1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user