// pricing.jsx — Pricing page: Subscriptions + Coin packages (dynamic from API) const PLAN_COLORS = { free: '#94a3b8', month: '#22d3ee', year: '#a78bfa', week: '#fbbf24', day: '#4ade80' }; // ─── Plan card (整张卡可点击) ─────────────────────────────────────────────── const PlanCard = ({ plan, isActive, onSelect }) => { const { t } = useI18n(); const color = PLAN_COLORS[plan.type] || '#22d3ee'; const isFree = plan.base_price === 0; const hasPromo = plan.promotion && plan.current_price < plan.base_price; const price = plan.current_price || plan.base_price; const clickable = !isActive && !isFree; const handleClick = () => { if (clickable) onSelect(plan); }; const handleKey = (e) => { if (clickable && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); onSelect(plan); } }; return (
{t('pricing2.description')}