fix(*): 全量 UI 审查与 undefined 展示异常修复
This commit is contained in:
@@ -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('支付方式'),
|
||||
|
||||
Reference in New Issue
Block a user