import React, { useState } from 'react'; import { ChevronLeft, Zap, CreditCard, Check, ShieldCheck, Gem } from 'lucide-react'; interface TopUpProps { onBack: () => void; } const RECHARGE_OPTIONS = [ { id: 1, points: 60, price: '¥6.00', bonus: null, tag: null }, { id: 2, points: 300, price: '¥30.00', bonus: '+15', tag: null }, { id: 3, points: 680, price: '¥68.00', bonus: '+50', tag: '热销' }, { id: 4, points: 1280, price: '¥128.00', bonus: '+120', tag: null }, { id: 5, points: 3280, price: '¥328.00', bonus: '+350', tag: '超值' }, { id: 6, points: 6480, price: '¥648.00', bonus: '+800', tag: null }, ]; const PAYMENT_METHODS = [ { id: 'alipay', name: '支付宝', icon: '支' }, { id: 'wechat', name: '微信支付', icon: '微' }, ]; const TopUp: React.FC = ({ onBack }) => { const [selectedOption, setSelectedOption] = useState(3); const [paymentMethod, setPaymentMethod] = useState('alipay'); const [isProcessing, setIsProcessing] = useState(false); const handlePay = () => { setIsProcessing(true); setTimeout(() => { setIsProcessing(false); alert('模拟支付成功!积分已到账。'); onBack(); }, 1500); }; return (
{/* Header */}

充值中心

{/* Spacer */}
{/* Current Balance Card */}
{/* Neon Accents */}
当前余额
2,450 积分
{/* Decorative Pattern */}
{/* Recharge Options Grid */}

选择充值金额

{RECHARGE_OPTIONS.map((opt) => { const isSelected = selectedOption === opt.id; return ( ); })}
{/* Payment Method (Visual Only) */}

支付方式

{PAYMENT_METHODS.map(method => ( ))}
{/* Terms */}

充值即代表您已同意《用户充值协议》。虚拟商品一旦售出,不支持退换。

{/* Bottom Action Bar */}
); }; export default TopUp;