Handle platform coin units in operations ledger

This commit is contained in:
wuyang
2026-11-04 11:14:12 +08:00
parent dde9742f9c
commit ac440f5299
+2
View File
@@ -19,6 +19,8 @@ function valueText(value) {
}
function money(value, currency = 'USD') {
if (typeof value !== 'number' || !Number.isFinite(value)) return '待核实';
if (currency === 'BILIBILI_COIN') return `${value} B站硬币`;
if (typeof currency !== 'string' || !/^[A-Z]{3}$/.test(currency)) return `${value} ${String(currency)}`;
return new Intl.NumberFormat('zh-CN', { style: 'currency', currency, maximumFractionDigits: 2 }).format(value);
}
function dateTime(value) {