Update server.js via upload script - 2026-08-07 17:20:47
This commit is contained in:
parent
112597ada3
commit
f655d7cfd7
|
|
@ -914,6 +914,11 @@ app.post('/api/ai/parse-catalog', requireAuth, aiLimiter, (req, res) => {
|
||||||
brand: hintBrand || p.brand,
|
brand: hintBrand || p.brand,
|
||||||
type: hintType || p.type,
|
type: hintType || p.type,
|
||||||
}));
|
}));
|
||||||
|
finalProducts.forEach(fp => {
|
||||||
|
if (Array.isArray(fp.extraSpecs) && fp.extraSpecs.length) {
|
||||||
|
console.log('[AI导入] extraSpecs for', fp.name, ':', JSON.stringify(fp.extraSpecs));
|
||||||
|
}
|
||||||
|
});
|
||||||
res.json({ products: finalProducts, ocrTextLength: text.length, truncated });
|
res.json({ products: finalProducts, ocrTextLength: text.length, truncated });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const hint = /empty response/i.test(e.message)
|
const hint = /empty response/i.test(e.message)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue