Files
pangolin/web/website/src/components/PricingPlans.jsx
T
wangjia e0912dd819 fix(website): 定价卡片 3 个按钮补链接(原纯 button 无响应)
PricingPlans.jsx 的 pcta 是纯 <button> 无 onClick/href → 点击无反应。改为
<a href>:Free「Download free」→ #download 下载区;Pro/Team「Get a code」→
#get-code(给渠道区 .pay-note 加 id,滚到购码渠道:自助店/USDT/Telegram/LINE/
邮箱)。.pcta 补 display:block/text-align:center/text-decoration:none 让 <a>
渲染同按钮。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 13:09:29 +08:00

61 lines
1.9 KiB
React

/**
* PricingPlans.jsx — 月/年切换 + 三档套餐卡(React island)。
* 迁自原型 .price-toggle + .price-grid + site.js __setCycle。
* 铁律 10:CTA 为「获取激活码 / 免费下载」,不含任何支付表单;价格对齐 design/CLAUDE.md §7。
*/
import { useState } from 'react';
import { Check } from 'lucide-react';
export default function PricingPlans({ data }) {
const [cycle, setCycle] = useState('monthly');
const i = cycle === 'monthly' ? 0 : 1;
return (
<>
<div class="wrap center">
<div class="price-toggle">
<button
class={cycle === 'monthly' ? 'on' : undefined}
data-cycle="monthly"
onClick={() => setCycle('monthly')}
>
{data.monthly}
</button>
<button
class={cycle === 'yearly' ? 'on' : undefined}
data-cycle="yearly"
onClick={() => setCycle('yearly')}
>
<span>{data.yearly}</span>
<span class="save">{data.save}</span>
</button>
</div>
</div>
<div class="wrap">
<div class="price-grid">
{data.plans.map((p) => (
<div key={p.key} class={p.highlight ? 'plan feat-plan' : 'plan'}>
{p.highlight && <div class="pop">{data.popular}</div>}
<div class="pname">{p.name}</div>
<div class="price">
{p.price[i]}
<small>{data.permo}</small>
</div>
<div class="pdesc">{p.desc}</div>
<ul class="feats">
{p.feats.map((f, fi) => (
<li key={fi}>
<Check />
<span>{f}</span>
</li>
))}
</ul>
<a href={p.href || '#get-code'} class={`pcta ${p.ctaClass}`}>{p.cta}</a>
</div>
))}
</div>
</div>
</>
);
}