diff --git a/pages/zhibo/index.nvue b/pages/zhibo/index.nvue index 9976dc2..95e6a89 100644 --- a/pages/zhibo/index.nvue +++ b/pages/zhibo/index.nvue @@ -442,6 +442,7 @@ export default { //构造chatRoomService that.chatRoomService.subscribeRoomMessage(room,currentUser) that.chatRoomService.initialWhenNewMessage(that.whenNewMessage); + taht.chatRoomService.initialWhenOnlineUserChange(that.newpeople) //获取当前聊天室数据 that.room = that.chatRoomService.room; console.log(that.room) @@ -461,6 +462,9 @@ export default { this.chatRoomService.quitRoom(); }, methods:{ + newpeople(list){ + this.room.onlineUsers = list + }, sendMessage (messageType, content) {//发送消息 if(!this.chatRoomService.status){ uni.showToast({