群组聊天的基础功能,nvue

This commit is contained in:
2022-02-10 16:46:23 +08:00
parent 13aed4abf5
commit 8656ddef55
19 changed files with 361 additions and 433 deletions

View File

@@ -58,7 +58,7 @@ const connect = (token, userInfo, callback) => {
// 设置未读消息数量
setNotifyBadge()
// 首次运行获取好友列表
const FK = 'IFTJ_' + userInfo.targetId
const FK = 'IFT_' + userInfo.targetId
uni.getStorage({
key: FK,
@@ -206,17 +206,14 @@ const newMessage = (msg) => {
status
}) => {
if (code === 0) {
if (status) {
if (status) {
uni.vibrateLong()
triTone()
}
}
})
setNotifyBadge()
if (msg.conversationType === RongIMLib.ConversationType.PRIVATE) {
uni.$emit('onReceivePrivateMessage', msg)
} else {
uni.$emit('onReceiveGroupMessage', msg)
}
uni.$emit('onReceiveMessage', msg)
}
// 播放状态