This commit is contained in:
Gdpao
2020-08-06 20:42:03 +08:00
parent 201f858833
commit 090b7cc753
22 changed files with 209 additions and 184 deletions

View File

@@ -106,9 +106,9 @@ export default {
methods: {
// 关注
following(id) {
this.is_follow = !this.is_follow;
this.$u.api.attentionMember({member_id: id}).then(res => {
if (res.errCode == 0) {
this.is_follow = !this.is_follow;
this.$u.toast(res.message);
}
})
@@ -116,10 +116,10 @@ export default {
// 点赞
likeType(id) {
// console.log(id);
this.is_like = !this.is_like;
this.$u.post("article/articleLike",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.is_like = !this.is_like;
this.list.like_num = res.data.num;
} else {
this.$u.toast(res.message);
@@ -128,10 +128,10 @@ export default {
},
// 收藏
collecting(id) {
this.is_collect = !this.is_collect;
this.$u.post("article/articleCollect",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.is_collect = !this.is_collect;
this.list.collect_num = res.data.num;
} else {
this.$u.toast(res.message);