import { useState, type ReactNode } from 'react'; import { Card, Row, Col, Typography, Image, Divider, Modal, Button, theme } from 'antd'; import { HeartOutlined, CheckCircleOutlined, FileTextOutlined, RocketOutlined, MessageOutlined, // StarOutlined, WechatOutlined } from '@ant-design/icons'; const { Title, Paragraph, Text } = Typography; interface SponsorOption { amount: number | string; label: string; image: string; description: string; } interface SponsorBenefit { icon: ReactNode; title: string; description: string; price?: string; } const sponsorOptions: SponsorOption[] = [ { amount: 5, label: '🌶️ 一包辣条', image: '/5.png', description: '¥5' }, { amount: 10, label: '🍱 一顿拼好饭', image: '/10.png', description: '¥10' }, { amount: 20, label: '☕ 一杯咖啡', image: '/20.png', description: '¥20' }, { amount: 50, label: '🍖 一次烧烤', image: '/50.png', description: '¥50' }, { amount: 99, label: '🍲 一顿海底捞', image: '/99.png', description: '¥99' }, ]; const benefits: SponsorBenefit[] = [ { icon: , title: '加入赞助群', description: '进入内部群,获取项目第一手更新消息', price: '(🌶️ 一包辣条)' }, { icon: , title: '优先需求响应', description: '您的功能需求和问题反馈将获得优先处理', price: '(🌶️ 一包辣条)' }, { icon: , title: 'Windows一键启动', description: '获取免安装一键启动包,开箱即可使用', price: '(🌶️ 一包辣条)' }, { icon: , title: '专属技术支持', description: '获得远程协助和配置指导', price: '(☕ 一杯咖啡)' } ]; export default function Sponsor() { const [modalVisible, setModalVisible] = useState(false); const [selectedOption, setSelectedOption] = useState(null); const { token } = theme.useToken(); const alphaColor = (color: string, alpha: number) => `color-mix(in srgb, ${color} ${(alpha * 100).toFixed(0)}%, transparent)`; const handleCardClick = (option: SponsorOption) => { setSelectedOption(option); setModalVisible(true); }; return (
{/* 头部标题区域 */}
赞助 MuMuAINovel SUPPORT MuMuAINovel 📚 MuMuAINovel - 基于 AI 的智能小说创作助手
{/* 赞助专属权益 */}
<CheckCircleOutlined style={{ color: token.colorSuccess, marginRight: '8px' }} /> 赞助专属权益 {benefits.map((benefit, index) => (
{benefit.icon}
{benefit.title} {benefit.description} {benefit.price && ( {benefit.price} )}
))}
{/* 选择金额 */}
<HeartOutlined style={{ color: token.colorError, marginRight: '8px' }} /> 选择金额 {sponsorOptions.map((option, index) => ( handleCardClick(option)} style={{ textAlign: 'center', borderRadius: '10px', boxShadow: `0 2px 8px ${alphaColor(token.colorTextBase, 0.12)}`, cursor: 'pointer', transition: 'all 0.3s', border: `2px solid ${token.colorBorder}` }} styles={{ body: { padding: 'clamp(16px, 3vh, 20px) clamp(10px, 2vw, 12px)' } }} onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-8px)'; e.currentTarget.style.boxShadow = `0 8px 24px ${alphaColor(token.colorPrimary, 0.3)}`; e.currentTarget.style.borderColor = token.colorPrimary; }} onMouseLeave={(e) => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = `0 2px 8px ${alphaColor(token.colorTextBase, 0.12)}`; e.currentTarget.style.borderColor = token.colorBorder; }} > {option.description} {option.label} ))}
{/* 感谢文案 */}
💖 感谢您对 MuMuAINovel 项目的支持 您的赞助将是我持续更新项目的动力,为大家提供更好的AI小说创作体验! {/*
*/}
{/* 二维码弹窗 */} {selectedOption?.description} {selectedOption?.label} 请使用微信扫码支付
} open={modalVisible} onCancel={() => setModalVisible(false)} footer={[ ]} width={400} centered >
{`${selectedOption?.description}赞助码`} 扫描二维码完成支付 支付后可添加微信/QQ联系我们获取权益
); }