feat(platform-admin): align frontend with backend contracts

This commit is contained in:
david
2026-07-28 14:26:09 +08:00
parent bc8138f978
commit 4cc17c9efb
6 changed files with 438 additions and 68 deletions

View File

@@ -40,6 +40,13 @@ export function buildResourcePayload(
payload[field.key] = number;
break;
}
case 'money': {
const amount = Number(value);
if (!Number.isFinite(amount))
throw new Error(`${field.label}必须是有效金额`);
payload[field.key] = Math.round(amount * 100);
break;
}
case 'boolean':
payload[field.key] = value === true || value === 'true';
break;