From 6a35ac33f569576d895da64f4fec6ffd061f59c0 Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Thu, 18 Dec 2025 21:19:29 +0800 Subject: [PATCH] =?UTF-8?q?improvement(chat):=20=E8=A1=A8=E6=83=85?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=94=AF=E6=8C=81=E4=B8=80=E9=94=AE=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit useApi 增加 downloadChatEmoji,对接后端表情下载接口 聊天页识别远程表情地址并提供下载入口;下载成功后切换为本地表情 URL 修正文本混排表情的渲染结构并微调选中态颜色 --- frontend/composables/useApi.js | 13 +++++ frontend/pages/chat.vue | 98 ++++++++++++++++++++++++++++++---- 2 files changed, 100 insertions(+), 11 deletions(-) diff --git a/frontend/composables/useApi.js b/frontend/composables/useApi.js index 2e10888..b8df076 100644 --- a/frontend/composables/useApi.js +++ b/frontend/composables/useApi.js @@ -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 diff --git a/frontend/pages/chat.vue b/frontend/pages/chat.vue index db63e2d..0b18b5b 100644 --- a/frontend/pages/chat.vue +++ b/frontend/pages/chat.vue @@ -4,7 +4,7 @@