Update public-api.js via upload script - 2026-11-18 11:54:25

This commit is contained in:
mike 2026-11-18 11:54:41 +08:00
parent 3677ceef0d
commit d4adc7d2d7
1 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ const DETAIL_FIELD = 'webDetailImages'; // 新增:详情图文件名数组,
const LIVE_TEMPLATES_KEY = 'crm:webTemplatesLive';
const TEMPLATES_KEY = 'crm:webDetailTemplates'; // 详情模板:[{ id, name, kind: 'images'|'html', images: [文件名], html }],图片在 uploads/<模板id>/
// 网站栏目 key(和网站 src/lib/catalog.mjs 一致):模板管理里"关联网站类目"可选的值
const SITE_PAGE_KEYS = ['mini', 'offline', 'online', 'aio', 'rack', 'modular', 'industrial', 'inverter', 'homeess', 'ciess',
const SITE_PAGE_KEYS = ['mini', 'offline', 'online', 'aio', 'rack', 'modular', 'industrial', 'solarups', 'inverter', 'homeess', 'ciess',
'wall', 'floor', 'rackbatt', 'hvcab', 'pbr', 'vrla', 'vrla2', 'cab', 'pac', 'idm', 'dem'];
const TEMPLATE_IDS_FIELD = 'webDetailTemplateIds'; // 产品引用的模板id,按顺序显示在详情图下方
// —— 网站管理(非产品内容)——
@ -390,7 +390,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', '机架式UPS': 'Rack-mount online double-conversion UPS', '机架式锂电UPS': 'Lithium-ion rack-mount online double-conversion UPS', '模块化UPS': 'Modular online UPS with hot-swappable power modules', '机架式模块化UPS': 'Rack-mount modular online UPS with hot-swappable power modules', '工频UPS': 'Industrial-frequency (transformer-based) online UPS with output isolation transformer', '在线式高频UPS': 'Online double-conversion high-frequency tower UPS', '太阳能混网逆变器': 'Hybrid solar inverter (solar + battery + grid, with backup output)', '并网/离网逆变器': 'Solar inverter (grid-tied / off-grid)', '机架式磷酸铁锂电池': 'Rack-mount LiFePO4 lithium battery module (19-inch, for solar energy storage and telecom)', '机架式锂电池': 'Rack-mount LiFePO4 lithium battery module (19-inch, for solar energy storage and telecom)', '一体式锂电UPS': 'All-in-one online double-conversion UPS with built-in LiFePO4 lithium battery (choose the number of battery packs for the backup time)', '锂电一体式UPS': 'All-in-one online double-conversion UPS with built-in LiFePO4 lithium battery (choose the number of battery packs for the backup time)', '壁挂式锂电池': 'Wall-mount LiFePO4 home battery (powerwall type, for solar and backup)', '壁挂式磷酸铁锂电池': 'Wall-mount LiFePO4 home battery (powerwall type, for solar and backup)', '落地式锂电池': 'Floor-standing LiFePO4 home battery on wheels (high capacity, for solar and backup)', '壁挂式储能一体机': 'Wall-mounted all-in-one home energy storage system (LiFePO4 battery and hybrid inverter in one unit, PV and mains input, UPS function)', '落地式储能一体机': 'Floor-standing all-in-one home energy storage system (LiFePO4 battery and hybrid inverter in one unit, PV and mains input, UPS function)', '风冷工商业储能柜': 'Air-cooled outdoor commercial & industrial energy storage cabinet (LiFePO4 battery and PCS in one IP54 cabinet, optional PV DC-DC and STS)', '液冷工商业储能柜': 'Liquid-cooled outdoor commercial & industrial energy storage cabinet (LiFePO4 battery and PCS in one IP54 cabinet, optional PV DC-DC and STS)', '高压堆叠式储能一体机': 'High-voltage stacked all-in-one home energy storage system (10 kW hybrid inverter on top of stackable high-voltage LiFePO4 battery layers, 10–20 kWh)', '低压堆叠式储能一体机': 'Low-voltage stacked all-in-one home energy storage system (5 kW hybrid inverter on top of stackable 51.2 V LiFePO4 battery layers, 15–25 kWh)', '铅酸电池': 'Valve-regulated lead-acid (VRLA / AGM) battery, maintenance-free, for UPS, telecom, security and solar backup', '阀控式铅酸电池': 'Valve-regulated lead-acid (VRLA / AGM) battery, maintenance-free, for UPS, telecom, security and solar backup', '胶体电池': 'Gel (VRLA) deep-cycle battery for solar and off-grid storage', 'AGM阀控密封式免维护铅酸蓄电池': 'AGM valve-regulated sealed maintenance-free lead-acid (VRLA) battery for UPS, telecom, security and solar backup', '锂电替换铅酸电池': 'LiFePO4 drop-in replacement for lead-acid batteries (12.8 V / 25.6 V / 51.2 V, same sizes as VRLA, for UPS, solar, RV and security)', '磷酸铁锂储能柜': 'High-voltage LiFePO4 battery cabinet (19-inch cabinet with master BMS, for online / industrial UPS and high-voltage hybrid inverters, replaces lead-acid battery strings)', '高压锂电池柜': 'High-voltage LiFePO4 battery cabinet (for UPS and high-voltage inverters)', '高压磷酸铁锂电池柜': 'High-voltage LiFePO4 battery cabinet (for UPS and high-voltage inverters)', '落地式磷酸铁锂电池': 'Floor-standing LiFePO4 home battery on wheels (high capacity, for solar and backup)' };
const TYPE_EN = { '太阳能UPS': 'Three-phase Solar UPS (PV inverter, LiFePO4 energy storage and online UPS with output isolation transformer in one cabinet)', '迷你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', '模块化UPS': 'Modular online UPS with hot-swappable power modules', '机架式模块化UPS': 'Rack-mount modular online UPS with hot-swappable power modules', '工频UPS': 'Industrial-frequency (transformer-based) online UPS with output isolation transformer', '在线式高频UPS': 'Online double-conversion high-frequency tower UPS', '太阳能混网逆变器': 'Hybrid solar inverter (solar + battery + grid, with backup output)', '并网/离网逆变器': 'Solar inverter (grid-tied / off-grid)', '机架式磷酸铁锂电池': 'Rack-mount LiFePO4 lithium battery module (19-inch, for solar energy storage and telecom)', '机架式锂电池': 'Rack-mount LiFePO4 lithium battery module (19-inch, for solar energy storage and telecom)', '一体式锂电UPS': 'All-in-one online double-conversion UPS with built-in LiFePO4 lithium battery (choose the number of battery packs for the backup time)', '锂电一体式UPS': 'All-in-one online double-conversion UPS with built-in LiFePO4 lithium battery (choose the number of battery packs for the backup time)', '壁挂式锂电池': 'Wall-mount LiFePO4 home battery (powerwall type, for solar and backup)', '壁挂式磷酸铁锂电池': 'Wall-mount LiFePO4 home battery (powerwall type, for solar and backup)', '落地式锂电池': 'Floor-standing LiFePO4 home battery on wheels (high capacity, for solar and backup)', '壁挂式储能一体机': 'Wall-mounted all-in-one home energy storage system (LiFePO4 battery and hybrid inverter in one unit, PV and mains input, UPS function)', '落地式储能一体机': 'Floor-standing all-in-one home energy storage system (LiFePO4 battery and hybrid inverter in one unit, PV and mains input, UPS function)', '风冷工商业储能柜': 'Air-cooled outdoor commercial & industrial energy storage cabinet (LiFePO4 battery and PCS in one IP54 cabinet, optional PV DC-DC and STS)', '液冷工商业储能柜': 'Liquid-cooled outdoor commercial & industrial energy storage cabinet (LiFePO4 battery and PCS in one IP54 cabinet, optional PV DC-DC and STS)', '高压堆叠式储能一体机': 'High-voltage stacked all-in-one home energy storage system (10 kW hybrid inverter on top of stackable high-voltage LiFePO4 battery layers, 10–20 kWh)', '低压堆叠式储能一体机': 'Low-voltage stacked all-in-one home energy storage system (5 kW hybrid inverter on top of stackable 51.2 V LiFePO4 battery layers, 15–25 kWh)', '铅酸电池': 'Valve-regulated lead-acid (VRLA / AGM) battery, maintenance-free, for UPS, telecom, security and solar backup', '阀控式铅酸电池': 'Valve-regulated lead-acid (VRLA / AGM) battery, maintenance-free, for UPS, telecom, security and solar backup', '胶体电池': 'Gel (VRLA) deep-cycle battery for solar and off-grid storage', 'AGM阀控密封式免维护铅酸蓄电池': 'AGM valve-regulated sealed maintenance-free lead-acid (VRLA) battery for UPS, telecom, security and solar backup', '锂电替换铅酸电池': 'LiFePO4 drop-in replacement for lead-acid batteries (12.8 V / 25.6 V / 51.2 V, same sizes as VRLA, for UPS, solar, RV and security)', '磷酸铁锂储能柜': 'High-voltage LiFePO4 battery cabinet (19-inch cabinet with master BMS, for online / industrial UPS and high-voltage hybrid inverters, replaces lead-acid battery strings)', '高压锂电池柜': 'High-voltage LiFePO4 battery cabinet (for UPS and high-voltage inverters)', '高压磷酸铁锂电池柜': 'High-voltage LiFePO4 battery cabinet (for UPS and high-voltage inverters)', '落地式磷酸铁锂电池': 'Floor-standing LiFePO4 home battery on wheels (high capacity, for solar and backup)' };
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) {