From f56c9ada3b3791ddb251535823ac2f9bc0a857e6 Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 23 Oct 2026 14:25:08 +0800 Subject: [PATCH] Update public-api.js via upload script - 2026-10-23 14:25:06 --- public-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public-api.js b/public-api.js index e207d64..575d876 100644 --- a/public-api.js +++ b/public-api.js @@ -243,13 +243,13 @@ async function translateTemplateHtml(ai, products) { // ===== 网站产品介绍:没手动填英文介绍的产品,由 AI 根据参数自动写一段 ===== // 参数变了会重新生成(缓存按参数内容算);手动填了英文介绍就一直用手动的。 -const TYPE_EN = { '迷你UPS': 'Mini DC UPS', '离线式UPS': 'Offline UPS', '离线式锂电UPS': 'Lithium-ion offline UPS', '在线互动式UPS': 'Line-interactive UPS', '机架式UPS': 'Rack-mount online double-conversion UPS' }; +const TYPE_EN = { '迷你UPS': 'Mini DC UPS', '离线式UPS': 'Offline UPS', '离线式锂电UPS': 'Lithium-ion offline UPS', '在线互动式UPS': 'Line-interactive UPS', '机架式UPS': 'Rack-mount online double-conversion UPS', '机架式锂电UPS': 'Lithium-ion rack-mount online double-conversion UPS' }; const DESC_SKIP = new Set(['model', 'brand', 'category', 'type', 'machineVariant', 'description', 'sale', 'youtube', 'sellingPoints', 'sockets', 'extraSpecs', 'pack']); const SOCKET_EN = { SCHUKO: 'Schuko', NEMA: 'NEMA 5-15', UK: 'BS 1363 (UK)', UNIVERSAL: 'universal', IEC: 'IEC C13', AU: 'Type I (AU/CN)' }; function descFacts(p) { const f = { model: p.model }; if (TYPE_EN[p.type]) f.type = TYPE_EN[p.type]; - if (p.type === '机架式UPS' && p.machineVariant) f.variant = /长/.test(p.machineVariant) ? 'Long-run model: no internal batteries, connects to an external battery bank' : 'Standard model with internal batteries'; + if ((p.type === '机架式UPS' || p.type === '机架式锂电UPS') && p.machineVariant) f.variant = /长/.test(p.machineVariant) ? 'Long-run model: no internal batteries, connects to an external battery bank' : 'Standard model with internal batteries'; for (const [k, v] of Object.entries(p)) { if (DESC_SKIP.has(k) || k.startsWith('_') || ['slug', 'images', 'detailImages', 'templateImages', 'templateHtml', 'specI18n'].includes(k)) continue; const en = p.specI18n && p.specI18n[k] && p.specI18n[k].en;