import { useState } from 'react'; import { Button } from '@/client/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card'; import { Badge } from '@/client/components/ui/badge'; import { Check, Star } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { membershipPlanClient } from '@/client/api'; export default function PricingPage() { const navigate = useNavigate(); const { data: membershipPlans } = useQuery({ queryKey: ['membership-plans-pricing'], queryFn: async () => { const response = await membershipPlanClient.$get(); if (!response.ok) throw new Error('获取套餐失败'); const data = await response.json(); return data.data.filter((plan: any) => plan.isActive === 1).sort((a: any, b: any) => a.sortOrder - b.sortOrder); }, }); const getTypeLabel = (type: string) => { const labels = { single: '单次', monthly: '单月', yearly: '年', lifetime: '永久', }; return labels[type as keyof typeof labels] || type; }; return (
{/* Header */}

元亨Word - 收费标准

{/* Hero Section */}

选择适合您的套餐

灵活的价格方案,满足不同用户的需求。从个人用户到企业团队,总有一款适合您。

新用户专享:首月立减50%
{/* Pricing Cards */}
{membershipPlans?.map((plan) => ( {plan.type === 'yearly' && ( 推荐 )}
{plan.name} {plan.description}
¥{plan.price}

{plan.durationDays === 0 ? '永久有效' : plan.durationDays === 1 ? '24小时有效' : `${plan.durationDays}天有效`}

    {plan.features?.map((feature: string, index: number) => (
  • {feature}
  • )) || (
  • 基础功能
  • )}
))}
{/* FAQ Section */}

常见问题

关于收费标准的详细说明

如何计费?

按月订阅,从激活当天开始计算。

可以升级套餐吗?

随时可以升级套餐,差价按剩余天数折算。

有免费试用吗?

可以跟管理员获取体验账号,体验全部功能。

如何付款?

扫描下方二维码完成付款后,将付款截图发送给管理员确认:

付款二维码

微信支付二维码

管理员微信

管理员微信二维码

管理员微信:andree123654

请在工作日9:00-18:00联系管理员进行确认,通常10分钟内可完成处理

{/* Footer */}
); }