连云港陪玩陪聊
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chunwan/pages/xiaoxi/heimingdan.vue

160 lines
3.1 KiB

2 months ago
<template>
<view class="dashan">
<view class="list">
1 month ago
<view class="item" v-for="(a,i) in list" :key="i" @click="toUser(a.userid)">
2 months ago
<view class="pic">
1 month ago
<image :src="a.faceImage?a.faceImage:a.img"></image>
2 months ago
</view>
<view class="content">
<view class="info">
1 month ago
<view class="name">{{a.nickname}}</view>
<view class="desc">{{a.declaration}}</view>
2 months ago
</view>
1 month ago
<view class="btn" @click.stop="toYichu(a.userid)">移除</view>
2 months ago
</view>
</view>
1 month ago
<view class="empty" v-if="isShow">
<image src="@/static/empty.png"></image>
<view class="txt">暂无数据</view>
</view>
2 months ago
</view>
1 month ago
<unverified :isPopup="isPopup" />
2 months ago
</view>
</template>
<script>
export default {
data() {
return {
1 month ago
isPopup: false,
isShow: false,
list: []
2 months ago
};
},
1 month ago
onLoad() {
const that = this;
uni.$on("closeSharePopup",res=>{
that.isPopup = false;
})
that.getList();
},
2 months ago
methods: {
1 month ago
async getList() {
const { code, data } = await this.$api.friendList({
userId: uni.getStorageSync("userInfo").id,
type: 2 //1关注 2黑名单 3粉丝 4访客 5好友
})
if(code == 200){
this.list = data;
this.isShow = data.length == 0?true:false
}
1 month ago
},
async toYichu(sellerId) {
const { code, data } = await this.$api.addOrRemoveBlacklist({
userId: uni.getStorageSync("userInfo").id,
sellerId,
type: 2
})
if(code == 200){
uni.showToast({
title: "移除成功"
})
setTimeout(()=>{
this.getList();
},2000)
}
1 month ago
},
toUser(id) {
if(uni.getStorageSync("userInfo").realnameFlag == 0){
this.isPopup = true;
return ;
}
uni.navigateTo({
url: "/pages/peiwan/detail?id="+id
2 months ago
})
1 month ago
},
2 months ago
}
}
</script>
<style scoped lang="scss">
1 month ago
2 months ago
.dashan{
1 month ago
min-height: 100vh;
background-color: #FFFFFF;
.empty{
padding: 150rpx 0;
text-align: center;
font-weight: 500;
font-size: 28rpx;
color: #222222;
image{
display: block;
width: 460rpx;
height: 400rpx;
margin: 0 auto;
}
}
2 months ago
padding: 0 25rpx;
overflow: hidden;
.item{
display: flex;
align-items: center;
.pic{
width: 90rpx;
height: 90rpx;
margin-right: 20rpx;
position: relative;
image{
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.content{
padding: 30rpx 0;
flex: 1;
border-bottom: 1px solid #EAEAEA;
display: flex;
align-items: center;
justify-content: space-between;
.info{
.name{
font-weight: 400;
font-size: 30rpx;
color: #222222;
image{
width: 95rpx;
height: 30rpx;
display: block;
}
}
.desc{
font-weight: 400;
font-size: 24rpx;
color: #AAAAAA;
margin-top: 15rpx;
max-width: 400rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.btn{
width: 150rpx;
line-height: 70rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
border-radius: 70rpx;
text-align: center;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
}
}
}
}
</style>