From 4390a67a1f49897b8bcb7ed8f75518e209db6ebb Mon Sep 17 00:00:00 2001 From: mike Date: Thu, 22 Oct 2026 14:56:36 +0800 Subject: [PATCH] Update public-api.js via upload script - 2026-10-22 14:56:35 --- public-api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public-api.js b/public-api.js index fc7f294..ebd970c 100644 --- a/public-api.js +++ b/public-api.js @@ -43,7 +43,8 @@ const FIELDS = { // —— 以下是需要在产品表单里新增的字段 —— youtube: 'youtubeUrl', // YouTube 链接,输出时只保留视频 ID description: 'webDescription', // { en, es?, ru? }:只需填 en,其他语言自动翻译;手动填了的语言优先用手动的 - sale: 'webSale', // { mode: 'group'|'stock', stock, minPrice, maxPrice } + sale: 'webSale', + pack: 'webPack', // 箱规 { per, nw, gw, l, w, h },网站按数量生成箱单 // { mode: 'group'|'stock', stock, minPrice, maxPrice } // —— 离线式 / 在线互动式 UPS 的参数(迷你UPS 一般不填,空的不输出)—— acInputVoltage: 'inputVoltage', // 离线式UPS 的输入电压(迷你UPS 用上面的 inputVoltage ← voltage) inputVoltageRange: 'inputVoltageRange', @@ -228,7 +229,7 @@ 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' }; -const DESC_SKIP = new Set(['model', 'brand', 'category', 'type', 'machineVariant', 'description', 'sale', 'youtube', 'sellingPoints', 'sockets', 'extraSpecs']); +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 };