直播人数

This commit is contained in:
luyuan 2020-08-14 14:40:01 +08:00
parent 3713cab533
commit f6ffcdec64
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}"> <video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors>
</video> </video>
<view class="user" :style="{'top': top}"> <view class="user" :style="{'top': top}">
@ -441,10 +441,10 @@ export default {
console.log(room,currentUser) console.log(room,currentUser)
//构造chatRoomService //构造chatRoomService
that.chatRoomService.subscribeRoomMessage(room,currentUser) that.chatRoomService.subscribeRoomMessage(room,currentUser)
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
taht.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
//获取当前聊天室数据 //获取当前聊天室数据
that.room = that.chatRoomService.room; that.room = that.chatRoomService.room;
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
console.log(that.room) console.log(that.room)
} }
}) })
@ -462,8 +462,12 @@ export default {
this.chatRoomService.quitRoom(); this.chatRoomService.quitRoom();
}, },
methods:{ methods:{
errors(a){
console.log(a)
},
newpeople(list){ newpeople(list){
this.room.onlineUsers = list this.room.onlineUsers = list
this.$forceUpdate();
}, },
sendMessage (messageType, content) {//发送消息 sendMessage (messageType, content) {//发送消息
if(!this.chatRoomService.status){ if(!this.chatRoomService.status){