feat: 调用gpt\nano模型方式修改,功能优化,增加下载采集图片等功能

This commit is contained in:
R524809
2026-08-20 17:00:40 +08:00
parent 90b7c8737d
commit 95cb93a160
20 changed files with 411 additions and 407 deletions
-22
View File
@@ -113,25 +113,3 @@ export function taobaoStateFromBridge(keys: Record<string, any>): SSRData | null
}
return null;
}
/** mtop pcdetail.data.get 响应 → SSRData(竞品验证的接口,结构同 res) */
export function taobaoStateFromMtop(data: unknown): SSRData | null {
if (!data || typeof data !== 'object') return null;
const d = data as any;
const item = d.item ?? d.itemDO;
if (!item) return null;
const images: string[] = (item.images ?? []).filter((u: unknown) => typeof u === 'string');
const videos = (item.videos ?? []).map((v: any) => ({ url: v?.url ?? v?.videoUrl, videoThumbnailURL: v?.videoThumbnailURL ?? v?.coverUrl })).filter((v: any) => v.url);
const params = paramsFromUnknown(d.params ?? d.propsList ?? d);
return {
item: {
title: item.title ?? '',
itemId: String(item.itemId ?? item.itemNumId ?? ''),
images,
videos,
},
skuBase: d.skuBase,
params: { basicParamList: params, enhanceParamList: [] },
price: d.skuCore?.price ?? undefined,
};
}