统一时间格式和时区
This commit is contained in:
@@ -21,9 +21,9 @@ import {
|
||||
QrcodeOutlined,
|
||||
SendOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import dayjs from 'dayjs'
|
||||
import { deliveryApi } from '../api'
|
||||
import type { DeliveryBindResult, DeliveryOrderInfo, DeliverySubmitResult } from '../types'
|
||||
import { formatDateTime } from '../utils/time'
|
||||
|
||||
const statusMap: Record<string, { color: string; text: string }> = {
|
||||
paid: { color: 'orange', text: '待发货' },
|
||||
@@ -150,7 +150,7 @@ export default function Delivery() {
|
||||
<Descriptions column={{ xs: 1, sm: 2 }} size="small" bordered>
|
||||
<Descriptions.Item label="买家">{order.buyer_name || '-'}</Descriptions.Item>
|
||||
<Descriptions.Item label="金额">{order.amount} 积分</Descriptions.Item>
|
||||
<Descriptions.Item label="创建时间">{formatTime(order.created_at)}</Descriptions.Item>
|
||||
<Descriptions.Item label="创建时间">{formatDateTime(order.created_at)}</Descriptions.Item>
|
||||
<Descriptions.Item label="渠道">{order.product?.game || channel.toUpperCase()}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
@@ -253,10 +253,6 @@ function CenteredShell({ children }: { children: ReactNode }) {
|
||||
)
|
||||
}
|
||||
|
||||
function formatTime(value?: string | null) {
|
||||
return value ? dayjs(value).format('YYYY-MM-DD HH:mm') : '-'
|
||||
}
|
||||
|
||||
const panelStyle: CSSProperties = {
|
||||
background: '#fff',
|
||||
border: '1px solid #e5e7eb',
|
||||
|
||||
Reference in New Issue
Block a user