diff --git a/pages/release/zhibo.nvue b/pages/release/zhibo.nvue index 4bb842a..3fd7424 100644 --- a/pages/release/zhibo.nvue +++ b/pages/release/zhibo.nvue @@ -477,7 +477,7 @@ that.chatRoomService.initialWhenNewMessage(that.whenNewMessage); //获取当前聊天室数据 that.room = that.chatRoomService.room; - that.chatRoomService.whenOnlineUserChange = that.renqu + that.chatRoomService.initialWhenOnlineUserChange(that.renqu) } }) let shi = 0; @@ -560,8 +560,8 @@ }, methods: { renqu(res){ - if(this.room.onlineUsers.users.length > this.renqu){ - this.renqu = this.room.onlineUsers.users.length + if(res.users.length > this.renqu){ + this.renqu = res.users.length } }, whenNewMessage (message) {//新消息监听