t添加了提示和直播
This commit is contained in:
@@ -126,6 +126,7 @@
|
||||
this.friend = JSON.parse(options.id);
|
||||
this.currentUser = this.imService.currentUser;
|
||||
let privateMessages = this.imService.getPrivateMessages(this.friend.uuid);
|
||||
this.imService.uid = this.friend.uuid;
|
||||
this.messages = privateMessages.sentMessages;
|
||||
this.pendingMessages = privateMessages.pendingMessages;
|
||||
|
||||
@@ -151,6 +152,7 @@
|
||||
this.imService.onPrivateHistoryLoad = (friendId, messages) =>{};
|
||||
//将未读消息数清零
|
||||
this.imService.resetFriendUnReadMessage(this.friend);
|
||||
this.imService.uid = 0;
|
||||
},
|
||||
methods: {
|
||||
initialListeners () {
|
||||
|
||||
@@ -476,6 +476,7 @@
|
||||
//构造chatRoomService
|
||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
||||
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||
that.chatRoomService.warrings = that.jinggao
|
||||
//获取当前聊天室数据
|
||||
that.room = that.chatRoomService.room;
|
||||
that.chatRoomService.initialWhenOnlineUserChange(that.renqu)
|
||||
@@ -560,6 +561,32 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
jinggao(text){
|
||||
console.log(text)
|
||||
if(text.message_type == 1){
|
||||
uni.showModal({
|
||||
title: '警告',
|
||||
content: text.content,
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
});
|
||||
}else if(text.message_type == 2){
|
||||
uni.showModal({
|
||||
title: '警告',
|
||||
content: text.content,
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
});
|
||||
this.stop()
|
||||
|
||||
}
|
||||
},
|
||||
renqu(res){
|
||||
if(res.users.length > this.renqu){
|
||||
this.renqu = res.users.length
|
||||
|
||||
Reference in New Issue
Block a user