删除确认框

This commit is contained in:
2026-02-26 16:43:50 +08:00
parent e1e4c8f531
commit a0b476da7a
2 changed files with 75 additions and 1 deletions

View File

@@ -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 }