From 95abb74db2f5bad39cf44e81e9b3f0c65931216c Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 5 Jul 2026 17:43:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(website):=20=E4=BB=B7=E6=A0=BC=E6=8C=89?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=88=86=E5=B8=81=E7=A7=8D=20=E2=80=94?= =?UTF-8?q?=E2=80=94=20=E8=8B=B1=E6=96=87=E7=89=88=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=BE=8E=E5=85=83(P0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PRICES 原为中英共用一份人民币值 → 英文页显示 ¥ 不专业。改为 Record: - zh: ¥0 / ¥25(年¥20) / ¥99(年¥79) - en: $0 / $3.99(年$3.19) / $13.99(年$11.19) 年付沿用 8 折 Pricing.astro 接收 lang 按语言取价;Site.astro 传入 lang。 构建产物核实:EN 页 0 处 ¥、ZH 页 0 处 $;红线扫描 0 命中。 Co-Authored-By: Claude Opus 4.8 --- web/website/src/components/Pricing.astro | 13 +++++++------ web/website/src/i18n/strings.ts | 18 +++++++++++++----- web/website/src/layouts/Site.astro | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/web/website/src/components/Pricing.astro b/web/website/src/components/Pricing.astro index b967e4d..e3cae7c 100644 --- a/web/website/src/components/Pricing.astro +++ b/web/website/src/components/Pricing.astro @@ -1,10 +1,11 @@ --- import Icon from './Icon.astro'; import PricingPlans from './PricingPlans.jsx'; -import { PRICES, type T } from '../i18n/strings'; +import { PRICES, type T, type Lang } from '../i18n/strings'; -interface Props { t: T } -const { t } = Astro.props; +interface Props { t: T; lang: Lang } +const { t, lang } = Astro.props; +const P = PRICES[lang]; const plansData = { monthly: t('price.monthly'), @@ -16,7 +17,7 @@ const plansData = { { key: 'free', name: t('price.free'), - price: PRICES.free, + price: P.free, desc: t('price.freedesc'), feats: [t('pf.free1'), t('pf.free2'), t('pf.free3'), t('pf.free4')], cta: t('price.cta_free'), @@ -26,7 +27,7 @@ const plansData = { { key: 'pro', name: t('price.pro'), - price: PRICES.pro, + price: P.pro, desc: t('price.prodesc'), feats: [t('pf.pro1'), t('pf.pro2'), t('pf.pro3'), t('pf.pro4'), t('pf.pro5')], cta: t('price.cta_pro'), @@ -36,7 +37,7 @@ const plansData = { { key: 'team', name: t('price.team'), - price: PRICES.team, + price: P.team, desc: t('price.teamdesc'), feats: [t('pf.team1'), t('pf.team2'), t('pf.team3'), t('pf.team4')], cta: t('price.cta_team'), diff --git a/web/website/src/i18n/strings.ts b/web/website/src/i18n/strings.ts index 8ce56c9..3ada1d2 100644 --- a/web/website/src/i18n/strings.ts +++ b/web/website/src/i18n/strings.ts @@ -193,9 +193,17 @@ export function createT(lang: Lang): T { }; } -/** 价格表(月 / 年),与 ui_kits/website/site.js 的 PRICES 同步,对齐 design/CLAUDE.md §7。 */ -export const PRICES: Record<'free' | 'pro' | 'team', [string, string]> = { - free: ['¥0', '¥0'], - pro: ['¥25', '¥20'], - team: ['¥99', '¥79'], +/** 价格表(月 / 年·按月),按语言分币种:zh=人民币、en=美元。年付约 8 折。 + * 对齐 design/CLAUDE.md §7;收款走客户端内兑换激活码,网页价仅为展示。 */ +export const PRICES: Record> = { + zh: { + free: ['¥0', '¥0'], + pro: ['¥25', '¥20'], + team: ['¥99', '¥79'], + }, + en: { + free: ['$0', '$0'], + pro: ['$3.99', '$3.19'], + team: ['$13.99', '$11.19'], + }, }; diff --git a/web/website/src/layouts/Site.astro b/web/website/src/layouts/Site.astro index da82658..e8fd76b 100644 --- a/web/website/src/layouts/Site.astro +++ b/web/website/src/layouts/Site.astro @@ -81,7 +81,7 @@ const headerT = { - +