import React, { useEffect, useState } from 'react'; import { useRouter } from 'next/router'; import MainLayout from '@/components/layouts/MainLayout'; import { CheckCircle, Loader2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; export default function PaymentSuccess() { const router = useRouter(); const [countdown, setCountdown] = useState(5); useEffect(() => { // 倒计时自动跳转 if (countdown > 0) { const timer = setTimeout(() => setCountdown(countdown - 1), 1000); return () => clearTimeout(timer); } else { router.push('/membership'); } }, [countdown, router]); return (

支付成功!

恭喜您成功开通会员,现在可以享受所有会员特权了!

{countdown} 秒后自动跳转到会员中心...
); }