From ac440f5299a614b2bcba013bf0d9ca4a43bada78 Mon Sep 17 00:00:00 2001 From: wuyang <5700876+banisherwy@user.noreply.gitee.com> Date: Wed, 4 Nov 2026 11:14:12 +0800 Subject: [PATCH] Handle platform coin units in operations ledger --- ops-portal/public/app.js | 2 ++ 1 file changed, 2 insertions(+) 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) {