fix(*): 全量 UI 审查与 undefined 展示异常修复

This commit is contained in:
zhanjunhao
2026-11-20 10:18:17 +08:00
parent 04cc45bbb7
commit 605cff1d58
65 changed files with 507 additions and 274 deletions
+4 -3
View File
@@ -43,6 +43,7 @@ import {
import { API } from '../../helpers/api';
import { showError, copy } from '../../helpers';
import { renderQuota } from '../../helpers/render';
import { formatCurrency, toFiniteNumber } from '../../helpers/safeDisplay';
const paymentMethodMap = {
wechat: '微信',
@@ -72,8 +73,8 @@ const payPalSettlementStateMap = {
};
const formatUSDMinor = (value) => {
if (value === null || value === undefined) return '-';
return `$${(Number(value) / 100).toFixed(2)}`;
const minor = toFiniteNumber(value);
return minor === null ? '-' : formatCurrency(minor / 100, '$');
};
import { Descriptions } from 'antd';
@@ -298,7 +299,7 @@ const AdminOrder = () => {
title: t('支付金额'),
dataIndex: 'money',
width: 90,
render: (v) => (v ? `¥${Number(v).toFixed(2)}` : '-'),
render: (v) => (v ? formatCurrency(v) : '-'),
},
{
title: t('支付方式'),