From 2007f2e601e43b8c14262bfccab104df27cc0c9e Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 9 Nov 2026 15:30:45 +0800 Subject: [PATCH] Update storage.js via upload script - 2026-11-09 15:30:36 --- storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage.js b/storage.js index 8f0af13..141521c 100644 --- a/storage.js +++ b/storage.js @@ -335,9 +335,9 @@ export async function getPreciseDoc(id) { return data; } // 把原版彩页翻译成某种语言(AI 翻译,结果存在服务器上,之后切换语言直接显示) -export async function translatePreciseDoc(id, lang) { +export async function translatePreciseDoc(id, lang, force) { const res = await fetch(`/api/precise/${encodeURIComponent(id)}/translate`, { - method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ lang }), + method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ lang, force: !!force }), }); const data = await res.json().catch(() => ({})); if (!res.ok) throw new Error(data.error || `翻译失败(HTTP ${res.status})`);