'use client'; interface OrderStatusProps { status: string; onBack: () => void; } const STATUS_CONFIG: Record = { COMPLETED: { label: '充值成功', color: 'text-green-600', icon: '✓', message: '余额已到账,感谢您的充值!', }, PAID: { label: '充值中', color: 'text-blue-600', icon: '⟳', message: '支付成功,正在充值余额中...', }, RECHARGING: { label: '充值中', color: 'text-blue-600', icon: '⟳', message: '正在充值余额中,请稍候...', }, FAILED: { label: '充值失败', color: 'text-red-600', icon: '✗', message: '充值失败,请联系管理员处理。', }, EXPIRED: { label: '订单超时', color: 'text-gray-500', icon: '⏰', message: '订单已超时,请重新创建订单。', }, CANCELLED: { label: '已取消', color: 'text-gray-500', icon: '✗', message: '订单已取消。', }, }; export default function OrderStatus({ status, onBack }: OrderStatusProps) { const config = STATUS_CONFIG[status] || { label: status, color: 'text-gray-600', icon: '?', message: '未知状态', }; return (
{config.icon}

{config.label}

{config.message}

); }