From e86cfb42e5f0ffce17238ad2f6464dee52f4c0e4 Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Mon, 20 Apr 2026 15:24:26 +0800 Subject: [PATCH] =?UTF-8?q?improvement(sns-ui):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=AF=BC=E5=87=BA=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=B8=8E=E4=BF=9D=E5=AD=98=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 HTML/JSON/TXT 导出格式切换 - 支持选择导出目录并自动保存导出包 - 增加总进度和当前联系人进度展示 --- frontend/composables/useApi.js | 3 +- frontend/pages/sns.vue | 483 ++++++++++++++++++++++++++++++--- 2 files changed, 444 insertions(+), 42 deletions(-) diff --git a/frontend/composables/useApi.js b/frontend/composables/useApi.js index 470ee02..fd0c747 100644 --- a/frontend/composables/useApi.js +++ b/frontend/composables/useApi.js @@ -453,7 +453,7 @@ export const useApi = () => { return await request(`/chat/exports/${encodeURIComponent(String(exportId))}`, { method: 'DELETE' }) } - // 朋友圈导出(离线 HTML zip) + // 朋友圈导出(离线 ZIP,支持 HTML / JSON / TXT) const createSnsExport = async (data = {}) => { return await request('/sns/exports', { method: 'POST', @@ -461,6 +461,7 @@ export const useApi = () => { account: data.account || null, scope: data.scope || 'selected', usernames: Array.isArray(data.usernames) ? data.usernames : [], + format: data.format || 'html', use_cache: data.use_cache == null ? true : !!data.use_cache, output_dir: data.output_dir == null ? null : String(data.output_dir || '').trim(), file_name: data.file_name || null diff --git a/frontend/pages/sns.vue b/frontend/pages/sns.vue index da1136a..53f113a 100644 --- a/frontend/pages/sns.vue +++ b/frontend/pages/sns.vue @@ -14,13 +14,61 @@ class="mt-2 w-full px-3 py-2 rounded-md border border-gray-200 bg-white text-sm outline-none focus:ring-2 focus:ring-[#576b95]/30 focus:border-[#576b95]" /> +