群解散的本地消息删除,提醒

This commit is contained in:
2022-02-17 12:06:30 +08:00
parent 155d59a6a3
commit 411b1ea349
7 changed files with 42 additions and 21 deletions

View File

@@ -53,10 +53,10 @@
},
onLoad() {
// 好友申请数量
this.checkNewFriendPending()
// 监听新的好友申请
uni.$on('onContactNotification', () => {
this.checkNewFriendPending()
this.checkNewFriendPending()
// 监听新的好友申请
uni.$on('onContactNotification', () => {
this.checkNewFriendPending()
})
},
onShow() {
@@ -76,7 +76,7 @@
},
methods: {
checkNewFriendPending() {
im.getPendingList((pendings) => {
im.getPendingList((pendings) => {
console.log(pendings);
this.hasNewFriends = pendings.length
})
@@ -94,9 +94,13 @@
getConversationList() {
const count = 1000
const timestamp = 0
RongIMLib.getConversationList([1, 3], count, timestamp, (res) => {
if (res.code === 0) {
this.conversations = res.conversations
RongIMLib.getConversationList([1, 3], count, timestamp, ({
code,
conversations
}) => {
console.log(conversations);
if (code === 0) {
this.conversations = conversations
}
})
},