clean
This commit is contained in:
@@ -56,7 +56,6 @@
|
|||||||
this.checkNewFriendPending()
|
this.checkNewFriendPending()
|
||||||
// 监听新的好友申请
|
// 监听新的好友申请
|
||||||
uni.$on('onContactNotification', () => {
|
uni.$on('onContactNotification', () => {
|
||||||
console.log('监听申请');
|
|
||||||
this.checkNewFriendPending()
|
this.checkNewFriendPending()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkNewFriendPending() {
|
checkNewFriendPending() {
|
||||||
console.log('触发新申请好友事件');
|
|
||||||
im.getPendingList((pendings) => {
|
im.getPendingList((pendings) => {
|
||||||
console.log(pendings);
|
console.log(pendings);
|
||||||
this.hasNewFriends = pendings.length
|
this.hasNewFriends = pendings.length
|
||||||
|
|||||||
@@ -160,9 +160,8 @@ const addListeners = () => {
|
|||||||
console.log('消息删除结果', code)
|
console.log('消息删除结果', code)
|
||||||
})
|
})
|
||||||
} else if (message.objectName === RongIMLib.ObjectName.ContactNotification) {
|
} else if (message.objectName === RongIMLib.ObjectName.ContactNotification) {
|
||||||
console.log('onContactNotification');
|
|
||||||
// 触发一个新好友的通知事件
|
// 触发一个新好友的通知事件
|
||||||
uni.$emit('onContactNotification', message.content)
|
uni.$emit('onContactNotification', message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user