From 30b99968dbe9643294a0f12a57f7c573cbc4fe76 Mon Sep 17 00:00:00 2001 From: zmr900709 <1838875027@qq.com> Date: Sat, 18 Jul 2020 19:52:47 +0800 Subject: [PATCH] tian jia guan zhu --- common/api/user.js | 6 ++++++ components/index/daren-item/index.vue | 28 ++++++++++++++++++++------- pages/index/index.vue | 19 ++++++++++++++---- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/common/api/user.js b/common/api/user.js index 3a69728..55234b2 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -286,6 +286,12 @@ export default { snsfriendList({ }) { return vm.$u.post('message/snsfriendList', { }); }, + // 关注达人 + attentionMember({ member_id }) { + return vm.$u.post('member/attentionMember', { + member_id : member_id + }); + }, // 公告消息列表 informationInfo({ }) { return vm.$u.post('message/informationInfo', { }); diff --git a/components/index/daren-item/index.vue b/components/index/daren-item/index.vue index 0051b22..5a338c4 100644 --- a/components/index/daren-item/index.vue +++ b/components/index/daren-item/index.vue @@ -3,7 +3,8 @@ {{ info.member_nickname }} 状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }} - 关注 + 关注 + 未关注 diff --git a/pages/index/index.vue b/pages/index/index.vue index c4c47ad..a333159 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -63,7 +63,7 @@ - + @@ -225,6 +225,16 @@ } }) }, + changeType(member_id){ + console.log(member_id); + this.$emit("pChangeType") + this.$u.api.attentionMember({ + member_id: member_id + }).then((res)=>{ + console.log(res) + this.getRecommendList(); + }) + }, getZhiBoSwiper() { this.$u.api.getZhiBoSwiper().then(res => { if (res.errCode == 0) { @@ -260,9 +270,10 @@ }) }, toSearchPage() { - uni.navigateTo({ - url: '/pageB/follow/index' - }) + + // uni.navigateTo({ + // url: '/pageB/follow/index' + // }) }, }, }