feat: 天河链去掉元数据上链存证改为仅发行NFT(feature用作品主图)

This commit is contained in:
Nixevol
2026-07-10 16:48:07 +08:00
parent 328c882a90
commit 0d650c993e
5 changed files with 37 additions and 18 deletions
+7 -3
View File
@@ -24,11 +24,15 @@ function requestMeta(raw: unknown): Record<string, unknown> | undefined {
return meta && typeof meta === 'object' ? (meta as Record<string, unknown>) : undefined;
}
function productInfo(raw: unknown): { productId: string; name: string; author?: string } | undefined {
function productInfo(
raw: unknown,
): { productId: string; name: string; author?: string; feature?: string } | undefined {
if (!raw || typeof raw !== 'object') return undefined;
const product = (raw as Record<string, unknown>).product as { productId?: string; name?: string; author?: string } | undefined;
const product = (raw as Record<string, unknown>).product as
| { productId?: string; name?: string; author?: string; feature?: string }
| undefined;
return product?.productId && product?.name
? { productId: product.productId, name: product.name, author: product.author }
? { productId: product.productId, name: product.name, author: product.author, feature: product.feature }
: undefined;
}