删除确认框
This commit is contained in:
@@ -263,5 +263,27 @@ export function goEasyMessageRead(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会话
|
||||
export function goEasyRemoveConversation(conversation) {
|
||||
if (!isGoEasyEnabled()) {
|
||||
return Promise.reject(new Error('GoEasy 未启用'))
|
||||
}
|
||||
|
||||
const goeasy = getPkGoEasy()
|
||||
const im = goeasy.im
|
||||
return new Promise((resolve, reject) => {
|
||||
im.removeConversation({
|
||||
conversation: conversation,
|
||||
onSuccess: function () {
|
||||
resolve(true)
|
||||
},
|
||||
onFailed: function (error) {
|
||||
console.log('删除会话失败,code:' + error.code + ',error:' + error.content)
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 导出 GoEasy 常量(用于事件监听)
|
||||
export { GoEasy }
|
||||
|
||||
Reference in New Issue
Block a user