群准入规则,申请入群的基础过程

This commit is contained in:
2022-02-14 16:58:08 +08:00
parent b61d90de4e
commit dde36aa26e
5 changed files with 237 additions and 70 deletions

View File

@@ -72,10 +72,10 @@
uni.$off('onReceiveMessage')
},
methods: {
checkNewFriendPending() {
im.getPendingList((pendings) => {
this.hasNewFriends = pendings.length
})
checkNewFriendPending() {
im.getPendingList((pendings) => {
this.hasNewFriends = pendings.length
})
},
// 检查登录
toLogin() {
@@ -101,10 +101,19 @@
uni.scanCode({
success: (res) => {
if (res.scanType == 'QR_CODE') {
res.result.substr(0, 10) == 'ADDFRIEND|'
uni.navigateTo({
url: '/pages/im/friends/info?targetId=' + res.result.substr(10)
})
if (res.result.substr(0, 10) == 'ADDFRIEND|') {
uni.navigateTo({
url: '/pages/im/friends/info?targetId=' + res.result.substr(10)
})
} else if (res.result.substr(0, 10) == 'JOINGROUP|') {
uni.navigateTo({
url: '/pages/im/group/apply?targetId=' + res.result.substr(10)
})
} else {
uni.showToast({
title: '暂不支持的二维码'
})
}
}
}
})