feat: 分站套餐页增加限时特惠标识

- 页面顶部添加限时特惠横幅,提示当前为特价
- 每个套餐卡片增加"特惠价"徽章
- 价格区域增加折扣百分比标签和涨价提示
- 中英文 i18n 键补全

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
abingyydsandClaude Sonnet 4.6 committed 2026-03-22 09:43:53 +09:00
1 parent 8a6f957843
commit d628477e4d
42 files changed
+78 -36

No files matched your search

+4
View File
@@ -180,6 +180,10 @@
"packages.resetMonthly": "Resets monthly",
"packages.periodicQuota": "${{amount}} {{period}} quota",
"packages.subscriptionInfo": "This is a subscription ({{period}}), valid for {{days}} days. Each period grants ${{amount}} quota. Unused quota expires.",
"packages.limitedTime": "Limited Time Offer",
"packages.limitedTimeDesc": "Current prices are introductory specials. API requests consume significant server and network resources — prices will increase in the future.",
"packages.specialPrice": "Special Price",
"packages.priceWillIncrease": "Introductory price — will increase later",
"common.sessionExpired": "Session expired, please log in again",
"common.requestFailed": "Request failed",
+4
View File
@@ -180,6 +180,10 @@
"packages.resetMonthly": "每月重置",
"packages.periodicQuota": "{{period}}额度 ${{amount}}",
"packages.subscriptionInfo": "📋 此套餐为周期订阅({{period}}),有效期 {{days}} 天。每个周期获得 ${{amount}} 额度,未用完作废。",
"packages.limitedTime": "限时特惠",
"packages.limitedTimeDesc": "当前价格为限时特价!API 请求对服务器及网络资源消耗巨大,此价格已非常优惠,未来将会涨价。",
"packages.specialPrice": "特惠价",
"packages.priceWillIncrease": "限时特价 · 后续将涨价",
"common.sessionExpired": "会话已过期,请重新登录",
"common.requestFailed": "请求失败",
+34
View File
@@ -102,6 +102,24 @@ export default function Packages() {
<p className="text-page-secondary max-w-xl mx-auto">
{t('packages.subtitle')}
</p>
{/* Limited-time offer banner */}
<div className="mt-6 max-w-2xl mx-auto">
<div className="relative overflow-hidden rounded-2xl bg-gradient-to-r from-amber-500/10 via-orange-500/10 to-red-500/10 border border-amber-500/20 px-5 py-4">
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(251,191,36,0.08),transparent_60%)]" />
<div className="relative flex items-center justify-center gap-3 flex-wrap">
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-amber-500/20 text-amber-400 text-xs font-bold uppercase tracking-wider animate-pulse">
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
{t('packages.limitedTime')}
</span>
<p className="text-sm text-amber-200/90">
{t('packages.limitedTimeDesc')}
</p>
</div>
</div>
</div>
</div>
{/* Active Subscriptions */}
@@ -167,6 +185,16 @@ export default function Packages() {
spotlightColor={spotlightColors[i % spotlightColors.length]}
>
<div className="p-6 flex-1 flex flex-col">
{/* Limited-time badge */}
<div className="flex items-center gap-2 mb-3">
<span className="inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-gradient-to-r from-amber-500/20 to-orange-500/20 text-amber-400 text-[10px] font-bold border border-amber-500/30">
<svg className="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
{t('packages.specialPrice')}
</span>
</div>
{/* Header */}
<div className="mb-4">
<div className="flex items-center gap-2">
@@ -189,10 +217,16 @@ export default function Packages() {
{pkg.original_price > 0 && pkg.original_price > pkg.price && (
<span className="text-lg text-page-muted line-through">${Number(pkg.original_price).toFixed(2)}</span>
)}
{pkg.original_price > 0 && pkg.original_price > pkg.price && (
<span className="text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400 font-semibold">
-{Math.round((1 - pkg.price / pkg.original_price) * 100)}%
</span>
)}
</div>
{pkg.duration > 0 && (
<p className="text-sm text-page-muted mt-1">{t('packages.daysAccess', { count: pkg.duration })}</p>
)}
<p className="text-[11px] text-amber-400/70 mt-1.5">{t('packages.priceWillIncrease')}</p>
</div>
{/* Features */}