diff --git a/pages/zhibo/index.nvue b/pages/zhibo/index.nvue index 8b6586b..b5a351a 100644 --- a/pages/zhibo/index.nvue +++ b/pages/zhibo/index.nvue @@ -388,7 +388,10 @@ export default { that.list= res.data.data } }) - },6 * 1000) + that.$forceUpdate(); + console.log(that.room) + + },60 * 1000) uni.request({ url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo", data:{ @@ -431,7 +434,7 @@ export default { that.chatRoomService.initialWhenNewMessage(that.whenNewMessage); //获取当前聊天室数据 that.room = that.chatRoomService.room; - + console.log(that.room) } }) } catch (error) { diff --git a/static/imservice.js b/static/imservice.js index e2389c9..d7b3871 100644 --- a/static/imservice.js +++ b/static/imservice.js @@ -833,7 +833,16 @@ IMService.prototype.sendMessages = function (roomId, content) { //退出聊天室 IMService.prototype.quitRoom = function (roomId) { - this.im.disconnect() + // this.im.subscribeGroup([0]) + // .then(result => { + // console.log('消息订阅成功') + // }).catch(e => { + // console.log(e,'失败') + // }) + // this.subscribePresence(0); + this.disconnect() + this.connectIM() + };