import React, { useState } from 'react'; import { Button, Card, Form, Input, message, Switch, Typography, Divider, } from 'antd'; import { SaveOutlined, WechatOutlined, AlipayCircleOutlined, DollarOutlined, } from '@ant-design/icons'; interface PaymentSetting { key: string; value: string; label: string; description: string; secret?: boolean; } const AdminPaymentConfig: React.FC = () => { const [saving, setSaving] = useState(false); const [wechatEnabled, setWechatEnabled] = useState(false); const [alipayEnabled, setAlipayEnabled] = useState(false); const [form] = Form.useForm(); const handleSave = async () => { try { const values = await form.validateFields(); setSaving(true); await new Promise(r => setTimeout(r, 500)); message.success('支付配置已保存'); setSaving(false); } catch { setSaving(false); } }; return (
{/* WeChat Pay */}
微信支付 微信商户号支付配置
{/* Alipay */}
支付宝 支付宝应用支付配置
{/* Recharge Packages */} 充值套餐}> {[ { name: '体验包', credits: 500, price: 49, color: '#f59e0b' }, { name: '进阶包', credits: 2000, price: 168, color: '#6366f1' }, { name: '专业包', credits: 5000, price: 388, color: '#06b6d4' }, { name: '企业包', credits: 20000, price: 1280, color: '#10b981' }, ].map(p => (
{p.name}
¥{p.price} {p.credits.toLocaleString()} 积分 ({(p.price / p.credits * 100).toFixed(1)}元/百积分)
))}
); }; export default AdminPaymentConfig;