mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-02-18 13:50:49 +08:00
improvement(chat): 表情消息支持一键下载并优化渲染
useApi 增加 downloadChatEmoji,对接后端表情下载接口 聊天页识别远程表情地址并提供下载入口;下载成功后切换为本地表情 URL 修正文本混排表情的渲染结构并微调选中态颜色
This commit is contained in:
@@ -95,6 +95,18 @@ export const useApi = () => {
|
||||
return await request(url, { method: 'POST' })
|
||||
}
|
||||
|
||||
const downloadChatEmoji = async (data = {}) => {
|
||||
return await request('/chat/media/emoji/download', {
|
||||
method: 'POST',
|
||||
body: {
|
||||
account: data.account || null,
|
||||
md5: data.md5 || '',
|
||||
emoji_url: data.emoji_url || '',
|
||||
force: !!data.force
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取图片解密密钥
|
||||
const getMediaKeys = async (params = {}) => {
|
||||
const query = new URLSearchParams()
|
||||
@@ -135,6 +147,7 @@ export const useApi = () => {
|
||||
listChatSessions,
|
||||
listChatMessages,
|
||||
openChatMediaFolder,
|
||||
downloadChatEmoji,
|
||||
getMediaKeys,
|
||||
saveMediaKeys,
|
||||
decryptAllMedia
|
||||
|
||||
Reference in New Issue
Block a user