upgrade 8.4

This commit is contained in:
2020-08-04 21:13:47 +08:00
parent fe9a54987e
commit 5343196342
5 changed files with 185 additions and 174 deletions

View File

@@ -2,16 +2,14 @@
<view class="concerns">
<view class="concerns-container">
<view v-for="(info, index) in list" :key="index">
<view class="daren-item" @click="toDetailsPage">
<view class="daren-item">
<image class="head" :src="info.friend_tomavatar"></image>
<text class="name">{{ info.friend_tomname }}</text>
<!-- <text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text> -->
<view class="guanzhu" @click="changeType(info.friend_frommid)" v-if="info.friend_followstate == 1">关注</view>
<view class="guanzhu action" @click="changeType(info.friend_frommid)" v-else>未关注</view>
<text class="name">{{ info.friend_tomname || '' }}</text>
<view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view>
</view>
</view>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" style="margin: 20vh auto 0;"></u-empty>
</view>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</view>
</template>
<script>
@@ -24,16 +22,30 @@ export default {
onShow() {
this.attentionMemberList();
},
// 下拉刷新
onPullDownRefresh() {
this.attentionMemberList();
},
methods: {
attentionMemberList() {
this.$u.api.attentionMemberList().then(res => {
uni.stopPullDownRefresh();
if(res.errCode == 0) {
this.list = res.data;
} else {
this.list = [];
}
})
}
},
changeType(id) {
console.log(id);
this.$u.api.attentionMember({
member_id: id
}).then(res => {
this.$u.toast(res.message);
this.attentionMemberList();
})
},
},
};
</script>
@@ -76,7 +88,7 @@ export default {
.guanzhu{
width: 130rpx;
height: 50rpx;
background-color: #FF780F;
background-color: #EDEDED;
font-size: 26rpx;
line-height: 50rpx;
color: #fff;