feat(subscription): add VIP subscription page
Add a new /subscription route showing three VIP membership plans (Monthly, Quarterly, Annual) with a pink→peach banner, per-plan gradient price bars, a benefits card, a mock activate CTA, and an agreement checkbox. - New reusable <Checkbox /> in src/app/_components/core for the legal agreement toggle - Hardcoded SUBSCRIPTION_PLANS constant in src/data/constants - New SubscriptionScreen composed of 7 colocated components (back link, user row, banner, plan card, benefits card, CTA button) with CSS Modules matching the existing design-token system - Route registered as protected and reached from /sidebar "Membership" - Mock CTA: window.alert + router.push(/chat) — no payment calls Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* VIP 订阅套餐常量
|
||||
*
|
||||
* Mock 阶段硬编码,后续可改为从 `ApiPath.paymentProducts` 拉取。
|
||||
*
|
||||
* 原始 Dart: lib/ui/subscription/...
|
||||
*/
|
||||
export type SubscriptionPlanId = "monthly" | "quarterly" | "annual";
|
||||
|
||||
export interface SubscriptionPlan {
|
||||
id: SubscriptionPlanId;
|
||||
/** 卡片顶部名称,例如 "Monthly" */
|
||||
name: string;
|
||||
/** 当前价格 */
|
||||
price: number;
|
||||
/** 划线原价 */
|
||||
originalPrice: number;
|
||||
/** 每日折算价字符串,e.g. "$0.66/day" */
|
||||
perDay: string;
|
||||
/** 是否高亮(默认推荐:月付) */
|
||||
highlight: boolean;
|
||||
}
|
||||
|
||||
export const SUBSCRIPTION_PLANS: readonly SubscriptionPlan[] = [
|
||||
{
|
||||
id: "monthly",
|
||||
name: "Monthly",
|
||||
price: 19.9,
|
||||
originalPrice: 24.9,
|
||||
perDay: "$0.66/day",
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
id: "quarterly",
|
||||
name: "Quarterly",
|
||||
price: 49.9,
|
||||
originalPrice: 59.9,
|
||||
perDay: "$0.55/day",
|
||||
highlight: false,
|
||||
},
|
||||
{
|
||||
id: "annual",
|
||||
name: "Annual",
|
||||
price: 169.9,
|
||||
originalPrice: 199.9,
|
||||
perDay: "$0.47/day",
|
||||
highlight: false,
|
||||
},
|
||||
] as const;
|
||||
Reference in New Issue
Block a user