diff --git a/ops-portal/public/app.js b/ops-portal/public/app.js index 20bdcda..e8c649a 100644 --- a/ops-portal/public/app.js +++ b/ops-portal/public/app.js @@ -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) {