feat: wire admin workflows to real APIs

This commit is contained in:
hectorzhao
2026-07-02 13:50:09 +08:00
parent f8c9b78c21
commit ab421cf8a7
42 changed files with 2596 additions and 250 deletions
+16 -8
View File
@@ -43,6 +43,14 @@ function formatAmount(value?: number) {
});
}
function RemarkCell({ value }: { value?: string }) {
return (
<div className={['admin-remark-cell', value ? '' : 'admin-remark-cell--empty'].filter(Boolean).join(' ')}>
{value || '暂无备注'}
</div>
);
}
export function AdminRechargeRecordsPage() {
const [records, setRecords] = useState(rechargeRecordsSeed);
const [enterpriseKeyword, setEnterpriseKeyword] = useState('');
@@ -116,13 +124,13 @@ export function AdminRechargeRecordsPage() {
<table className="ui-table admin-recharge-table">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th style={{ width: '240px' }}></th>
<th style={{ width: '180px' }}></th>
<th style={{ width: '130px' }}></th>
<th style={{ width: '140px' }}></th>
<th style={{ width: '120px' }}></th>
<th style={{ width: '110px' }}></th>
<th style={{ width: '300px' }}></th>
</tr>
</thead>
<tbody>
@@ -134,7 +142,7 @@ export function AdminRechargeRecordsPage() {
<td>{formatAmount(record.balance)}</td>
<td><Tag tone={record.type === 'manual' ? 'warning' : 'info'}>{record.type === 'manual' ? '人工充值' : '套餐充值'}</Tag></td>
<td>{record.operator}</td>
<td>{record.remark ?? '-'}</td>
<td><RemarkCell value={record.remark} /></td>
</tr>
))}
</tbody>