Merge pull request '人数' (#108) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/108
This commit is contained in:
luyuan 2020-08-04 11:44:41 +08:00
commit 20ba2e4e8f

View File

@ -13,10 +13,10 @@
<view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view> <view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
</view> </view>
<view class="userlist" :style="{'top': top + 10 * rpx}"> <view class="userlist" :style="{'top': top + 10 * rpx}">
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image> <image class="userlistitem" v-for="(i,j) in room.onlineUsers.users.slice(0,3)" :src="i.avatar" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
</view> </view>
<view class="hot" :style="{'top': top + 10 * rpx}"> <view class="hot" :style="{'top': top + 10 * rpx}">
<text class="hottext">2.8w</text> <text class="hottext">{{room.onlineUsers.users.length}}</text>
</view> </view>
<image class="cart" src="../../static/cart.png" @click="show = true"> <image class="cart" src="../../static/cart.png" @click="show = true">
@ -179,7 +179,6 @@
height: 60rpx; height: 60rpx;
position: relative; position: relative;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #0f0;
} }
.userlist{ .userlist{
display: flex; display: flex;
@ -260,7 +259,6 @@
height: 31rpx; height: 31rpx;
position: fixed; position: fixed;
right: 31rpx; right: 31rpx;
background-color: #0f0;
} }
.danmufasongbox{ .danmufasongbox{
width: 308rpx; width: 308rpx;
@ -448,6 +446,7 @@ export default {
//获取当前聊天室数据 //获取当前聊天室数据
that.room = that.chatRoomService.room; that.room = that.chatRoomService.room;
console.log(that.room.onlineUsers)
}, 2000); }, 2000);
} }
}) })