消息撤回修复
This commit is contained in:
@@ -121,8 +121,8 @@
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '消息撤回成功'
|
title: '消息撤回成功'
|
||||||
})
|
})
|
||||||
IMLib.getMessage(this.message.messageId, res => {
|
IMLib.getMessage(this.message.messageId, res => {
|
||||||
uni.$emit('onRecallMessage', res.message)
|
uni.$emit('onRecallMessage_' + this.message.targetId, res.message)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ export default {
|
|||||||
name: contactInfo.name,
|
name: contactInfo.name,
|
||||||
hash: contactInfo.hash,
|
hash: contactInfo.hash,
|
||||||
portraitUrl: contactInfo.portraitUrl,
|
portraitUrl: contactInfo.portraitUrl,
|
||||||
localAvatar: savedFilePath
|
localAvatar: savedFilePath,
|
||||||
|
type: contactInfo.type
|
||||||
}
|
}
|
||||||
model.update('targetId="' + contactInfo.targetId + '"', info, (err,
|
model.update('targetId="' + contactInfo.targetId + '"', info, (err,
|
||||||
res) => {
|
res) => {
|
||||||
@@ -90,7 +91,8 @@ export default {
|
|||||||
name: contactInfo.name,
|
name: contactInfo.name,
|
||||||
hash: contactInfo.hash,
|
hash: contactInfo.hash,
|
||||||
portraitUrl: contactInfo.portraitUrl,
|
portraitUrl: contactInfo.portraitUrl,
|
||||||
localAvatar: result[0].localAvatar
|
localAvatar: result[0].localAvatar,
|
||||||
|
type: contactInfo.type
|
||||||
}
|
}
|
||||||
model.update('targetId="' + contactInfo.targetId + '"', info, (err, res) => {
|
model.update('targetId="' + contactInfo.targetId + '"', info, (err, res) => {
|
||||||
console.log('UPDATE NAME, ERR', err, info);
|
console.log('UPDATE NAME, ERR', err, info);
|
||||||
@@ -117,7 +119,8 @@ export default {
|
|||||||
name: contactInfo.name,
|
name: contactInfo.name,
|
||||||
hash: contactInfo.hash,
|
hash: contactInfo.hash,
|
||||||
portraitUrl: contactInfo.portraitUrl,
|
portraitUrl: contactInfo.portraitUrl,
|
||||||
localAvatar: savedFilePath
|
localAvatar: savedFilePath,
|
||||||
|
type: contactInfo.type
|
||||||
}
|
}
|
||||||
model.insert(info, (err, res) => {})
|
model.insert(info, (err, res) => {})
|
||||||
// 保存头像后,更新信息
|
// 保存头像后,更新信息
|
||||||
@@ -130,7 +133,8 @@ export default {
|
|||||||
name: contactInfo.name,
|
name: contactInfo.name,
|
||||||
hash: contactInfo.hash,
|
hash: contactInfo.hash,
|
||||||
portraitUrl: contactInfo.portraitUrl,
|
portraitUrl: contactInfo.portraitUrl,
|
||||||
localAvatar: ''
|
localAvatar: '',
|
||||||
|
type: contactInfo.type
|
||||||
}
|
}
|
||||||
model.insert(info, (err, res) => {})
|
model.insert(info, (err, res) => {})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ const connect = (token, userInfo, callback) => {
|
|||||||
// 设置未读消息数量
|
// 设置未读消息数量
|
||||||
setNotifyBadge()
|
setNotifyBadge()
|
||||||
// 首次运行获取好友列表
|
// 首次运行获取好友列表
|
||||||
const FK = 'ZHKD_' + userInfo.targetId
|
const FK = 'ZH_V_' + userInfo.targetId
|
||||||
|
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: FK,
|
key: FK,
|
||||||
|
|||||||
@@ -13,9 +13,13 @@ const contactModel = usqlite.model('contacts', {
|
|||||||
type: String,
|
type: String,
|
||||||
unique: true
|
unique: true
|
||||||
},
|
},
|
||||||
portraitUrl: String,
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
portraitUrl: String,
|
||||||
localAvatar: String
|
localAvatar: String
|
||||||
})
|
})
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
contactModel
|
contactModel
|
||||||
|
|||||||
Reference in New Issue
Block a user