消息撤回修复

This commit is contained in:
2022-02-24 13:19:59 +08:00
parent 0eb6be37be
commit 4888cf2ad1
4 changed files with 17 additions and 9 deletions

View File

@@ -121,8 +121,8 @@
icon: 'none',
title: '消息撤回成功'
})
IMLib.getMessage(this.message.messageId, res => {
uni.$emit('onRecallMessage', res.message)
IMLib.getMessage(this.message.messageId, res => {
uni.$emit('onRecallMessage_' + this.message.targetId, res.message)
})
} else {
uni.showToast({

View File

@@ -76,7 +76,8 @@ export default {
name: contactInfo.name,
hash: contactInfo.hash,
portraitUrl: contactInfo.portraitUrl,
localAvatar: savedFilePath
localAvatar: savedFilePath,
type: contactInfo.type
}
model.update('targetId="' + contactInfo.targetId + '"', info, (err,
res) => {
@@ -90,7 +91,8 @@ export default {
name: contactInfo.name,
hash: contactInfo.hash,
portraitUrl: contactInfo.portraitUrl,
localAvatar: result[0].localAvatar
localAvatar: result[0].localAvatar,
type: contactInfo.type
}
model.update('targetId="' + contactInfo.targetId + '"', info, (err, res) => {
console.log('UPDATE NAME, ERR', err, info);
@@ -117,7 +119,8 @@ export default {
name: contactInfo.name,
hash: contactInfo.hash,
portraitUrl: contactInfo.portraitUrl,
localAvatar: savedFilePath
localAvatar: savedFilePath,
type: contactInfo.type
}
model.insert(info, (err, res) => {})
// 保存头像后,更新信息
@@ -130,7 +133,8 @@ export default {
name: contactInfo.name,
hash: contactInfo.hash,
portraitUrl: contactInfo.portraitUrl,
localAvatar: ''
localAvatar: '',
type: contactInfo.type
}
model.insert(info, (err, res) => {})
}

View File

@@ -62,7 +62,7 @@ const connect = (token, userInfo, callback) => {
// 设置未读消息数量
setNotifyBadge()
// 首次运行获取好友列表
const FK = 'ZHKD_' + userInfo.targetId
const FK = 'ZH_V_' + userInfo.targetId
uni.getStorage({
key: FK,

View File

@@ -13,9 +13,13 @@ const contactModel = usqlite.model('contacts', {
type: String,
unique: true
},
portraitUrl: String,
type: {
type: Number,
default: 0
},
portraitUrl: String,
localAvatar: String
})
})
export default {
contactModel