deming/components/index/zhibo-item/index.vue

104 lines
2.5 KiB
Vue
Raw Normal View History

2020-06-02 01:34:37 +00:00
<template>
2020-07-27 09:32:17 +00:00
<view class="zhibo" @click="zhibo">
2020-07-27 06:35:32 +00:00
<image class="head" :src="image"></image>
2020-06-02 01:34:37 +00:00
<view class="user">
<view class="name">
2020-08-13 08:36:34 +00:00
<image :src="item.member_avatar"></image>
2020-07-27 06:35:32 +00:00
<text class="u-line-1" style="width:130rpx">{{name}}</text>
2020-06-02 01:34:37 +00:00
</view>
2020-08-13 02:04:50 +00:00
<view class="pingbi" @click.stop="articleAddShield">
<image src="/static/image/common/7.png"></image>
<text>屏蔽用户</text>
2020-06-02 01:34:37 +00:00
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.zhibo{
width: 335rpx;
margin-top: 20rpx;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
.head{
width: 100%;
height: 425rpx;
}
.user{
display: flex;
justify-content: space-between;
align-items: center;
margin:0 auto;
margin-top: 20rpx;
width: 307rpx;
.name{
display: flex;
align-items: center;
>image{
width: 38rpx;
height: 38rpx;
border-radius: 50%;
}
>text{
font-size: 20rpx;
color:#333;
margin-left: 9rpx;
}
}
.pingbi{
display: flex;
align-items: center;
>text{
font-size: 20rpx;
color: #333;
margin-left: 9rpx;
}
>image{
width: 24rpx;
height: 24rpx;
}
}
}
}
</style>
<script>
export default {
name:"zhibo-item",
data(){
return {
}
2020-07-27 06:35:32 +00:00
},
2020-07-27 09:32:17 +00:00
methods:{
zhibo(){
2020-09-16 10:35:21 +00:00
this.$u.api.countLiveBrowse({live_id:this.zid}).then((res)=>{
console.log(JSON.stringify(res),77)
})
2020-07-27 09:32:17 +00:00
this.$u.route({
2020-08-03 01:05:30 +00:00
url:"/pages/zhibo/index",
2020-07-27 09:32:17 +00:00
params:{
2020-07-31 01:40:06 +00:00
url:this.url,
2020-08-03 01:05:30 +00:00
id:this.zid,
rid:this.rid
2020-07-27 09:32:17 +00:00
}
})
2020-09-16 10:35:21 +00:00
2020-08-13 02:04:50 +00:00
},
articleAddShield() {
console.log(this.item)
this.$u.api.articleAddShield({
member_id: this.item.user_id,
}).then(res => {
// console.log(res)
if(res.errCode == 0) {
this.$u.toast(res.message);
this.$emit("updateList");
}
})
},
2020-07-27 09:32:17 +00:00
},
2020-08-13 02:04:50 +00:00
props:['name','image','url','zid','rid','item']
2020-06-02 01:34:37 +00:00
}
</script>