vip资源修复

This commit is contained in:
zhx 2026-05-23 14:54:14 +08:00
parent 94d7c7529b
commit 8677241ae8

View File

@ -249,7 +249,7 @@ function normalizeDisplayResource(
amount: firstPresent(item, ['amount', 'giftCandy', 'price', 'goldAmount', 'priceGold']),
cover: String(cover || ''),
durationDays: Number(firstPresent(item, ['durationDays']) || 0) || undefined,
id: id as number | string,
id: String(id ?? ''),
key: getResourceKey(kind, detailType, id),
kind,
level: Number(firstPresent(item, ['level']) || 0) || undefined,
@ -518,7 +518,7 @@ async function loadOptions(type: string) {
{
cover: preview.cover,
durationDays,
id: item.id ?? '',
id: String(item.id ?? ''),
level,
name: String(item.displayName || item.levelCode || `VIP ${level}`),
priceGold: Number(item.priceGold || 0),