订单类型采用int类型匹配

This commit is contained in:
马梓彭 2026-04-14 11:39:59 +08:00
parent c3ec9298f7
commit 00a157e7b5
2 changed files with 12 additions and 10 deletions

View File

@ -2,11 +2,12 @@ const auth = require('../../../utils/auth');
const { formatTime } = require('../../../utils/format');
const STATUS_MAP = {
Pending: { text: '待支付', key: 'pending' },
Paid: { text: '交易成功', key: 'success' },
Cancelled: { text: '已取消', key: 'cancelled' },
Refunded: { text: '已退款', key: 'refunded' },
Refunding: { text: '退款中', key: 'pending' }
0: { text: '待支付', key: 'pending' },
1: { text: '已支付', key: 'success' },
2: { text: '已取消', key: 'cancelled' },
3: { text: '已退款', key: 'refunded' },
4: { text: '已发货', key: 'success' },
5: { text: '已完成', key: 'success' }
};
const PAYMENT_METHOD_MAP = {

View File

@ -5,11 +5,12 @@ const PAGE_SIZE = 10;
// orderStatus 枚举 → 显示文案 & 样式 key
const STATUS_MAP = {
Pending: { text: '待支付', key: 'pending' },
Paid: { text: '交易成功', key: 'success' },
Cancelled: { text: '已取消', key: 'cancelled' },
Refunded: { text: '已退款', key: 'refunded' },
Refunding: { text: '退款中', key: 'pending' }
0: { text: '待支付', key: 'pending' },
1: { text: '已支付', key: 'success' },
2: { text: '已取消', key: 'cancelled' },
3: { text: '已退款', key: 'refunded' },
4: { text: '已发货', key: 'success' },
5: { text: '已完成', key: 'success' }
};
function formatOrder(item) {