feat(account): add subscription purchase page - #949
Merged
xiaocheny214 merged 2 commits intoSep 20, 2026
Merged
Conversation
Signed-in users need a direct place to compare plans and buy credits. Add the protected subscription route, account entry points, aligned plan cards, and credits purchase controls. Keep payment and account subscription APIs out of this frontend-only delivery and explain the unavailable payment flow in a dialog.
Subscription selection and credit validation need regression coverage. Cover rounded credit calculations, invalid custom amounts, plan selection, and the payment-unavailable dialog. Keep the browser behavior explicit while no payment request is made.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #949 +/- ##
=======================================
Coverage 91.27% 91.27%
=======================================
Files 193 193
Lines 13204 13204
=======================================
Hits 12052 12052
Misses 1152 1152
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
xiaocheny214
approved these changes
Sep 20, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为登录用户新增订阅与积分充值页面,补齐账号菜单升级入口与账号设置入口,并在支付未接入时给出明确说明。
Why
#947 需要一个可审阅的前端购买入口,让用户能快速比较套餐、选择积分充值金额并看到当前 Free 方案包含的能力。
支付、订单、会员账期和积分接口尚未接入,本次先把真实产品路由和明确的未接入提示落下来,避免点击购买后产生错误预期。
Changes
/account/subscription,提供 Plus、Pro、Max 月度套餐和积分充值页签。Implementation
AppShellRoute下,使用现有 React Router 和设计变量,不新增平行 mock 路由。dialog提示,后续可在同一入口替换为真实支付流程。Verification
npx vitest run src/pages/subscription/index.test.tsx src/app/layout/app-header.test.tsx src/pages/account/index.test.tsx:3 个文件、58 个测试通过npx tsc -b:通过npx oxlint src/app/app.tsx src/app/layout/app-header.tsx src/pages/account/index.tsx src/pages/subscription/index.tsx src/pages/subscription/index.test.tsx:通过npx oxfmt --check src/app/app.tsx src/app/layout/app-header.tsx src/pages/account/index.tsx src/pages/subscription/index.tsx src/pages/subscription/index.test.tsx src/pages/subscription/subscription.css:通过npm run build:生产构建通过git diff --check:通过Scope
Related Issues
Closes #948
Refs #947