From bd86ccce8582ab543051672510205bcd99b68f31 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Tue, 2 Dec 2025 12:01:59 +0800 Subject: [PATCH] update pay ui --- app.py | 8 +- .../Subscription/SubscriptionContent.js | 24 +++++- src/mocks/handlers/account.js | 77 +++++++++++++++++++ .../Pages/Account/subscription-content.tsx | 4 +- 4 files changed, 103 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index 039954c9..45d2d7c1 100755 --- a/app.py +++ b/app.py @@ -1510,8 +1510,8 @@ def initialize_subscription_plans_safe(): pro_plan = SubscriptionPlan( name='pro', - display_name='Pro版本', - description='适合个人投资者的基础功能套餐', + display_name='Pro 专业版', + description='事件关联股票深度分析 | 历史事件智能对比复盘 | 事件概念关联与挖掘 | 概念板块个股追踪 | 概念深度研报与解读 | 个股异动实时预警', monthly_price=0.01, yearly_price=0.08, features=json.dumps([ @@ -1526,8 +1526,8 @@ def initialize_subscription_plans_safe(): max_plan = SubscriptionPlan( name='max', - display_name='Max版本', - description='适合专业投资者的全功能套餐', + display_name='Max 旗舰版', + description='包含Pro版全部功能 | 事件传导链路智能分析 | 概念演变时间轴追溯 | 个股全方位深度研究 | 价小前投研助手无限使用 | 新功能优先体验权 | 专属客服一对一服务', monthly_price=0.1, yearly_price=0.8, features=json.dumps([ diff --git a/src/components/Subscription/SubscriptionContent.js b/src/components/Subscription/SubscriptionContent.js index 0a2726fe..5c1d8523 100644 --- a/src/components/Subscription/SubscriptionContent.js +++ b/src/components/Subscription/SubscriptionContent.js @@ -1049,10 +1049,26 @@ export default function SubscriptionContent() { - - - {plan.description} - + + + {plan.description && plan.description.includes('|') ? ( + plan.description.split('|').map((item, idx) => ( + + ✓ {item.trim()} + + )) + ) : ( + + {plan.description} + + )} + {(() => { // 获取当前选中的周期信息 if (plan.pricing_options) { diff --git a/src/mocks/handlers/account.js b/src/mocks/handlers/account.js index ad388b51..accdaee8 100644 --- a/src/mocks/handlers/account.js +++ b/src/mocks/handlers/account.js @@ -696,4 +696,81 @@ export const accountHandlers = [ } }); }), + + // 21. 获取订阅套餐列表 + http.get('/api/subscription/plans', async () => { + await delay(NETWORK_DELAY); + + const plans = [ + { + id: 1, + name: 'pro', + display_name: 'Pro 专业版', + description: '事件关联股票深度分析 | 历史事件智能对比复盘 | 事件概念关联与挖掘 | 概念板块个股追踪 | 概念深度研报与解读 | 个股异动实时预警', + monthly_price: 299, + yearly_price: 2699, + pricing_options: [ + { cycle_key: 'monthly', label: '月付', months: 1, price: 299, original_price: null, discount_percent: 0 }, + { cycle_key: 'quarterly', label: '季付', months: 3, price: 799, original_price: 897, discount_percent: 11 }, + { cycle_key: 'semiannual', label: '半年付', months: 6, price: 1499, original_price: 1794, discount_percent: 16 }, + { cycle_key: 'yearly', label: '年付', months: 12, price: 2699, original_price: 3588, discount_percent: 25 } + ], + features: [ + '新闻信息流', + '历史事件对比', + '事件传导链分析(AI)', + '事件-相关标的分析', + '相关概念展示', + 'AI复盘功能', + '企业概览', + '个股深度分析(AI) - 50家/月', + '高效数据筛选工具', + '概念中心(548大概念)', + '历史时间轴查询 - 100天', + '涨停板块数据分析', + '个股涨停分析' + ], + sort_order: 1 + }, + { + id: 2, + name: 'max', + display_name: 'Max 旗舰版', + description: '包含Pro版全部功能 | 事件传导链路智能分析 | 概念演变时间轴追溯 | 个股全方位深度研究 | 价小前投研助手无限使用 | 新功能优先体验权 | 专属客服一对一服务', + monthly_price: 599, + yearly_price: 5399, + pricing_options: [ + { cycle_key: 'monthly', label: '月付', months: 1, price: 599, original_price: null, discount_percent: 0 }, + { cycle_key: 'quarterly', label: '季付', months: 3, price: 1599, original_price: 1797, discount_percent: 11 }, + { cycle_key: 'semiannual', label: '半年付', months: 6, price: 2999, original_price: 3594, discount_percent: 17 }, + { cycle_key: 'yearly', label: '年付', months: 12, price: 5399, original_price: 7188, discount_percent: 25 } + ], + features: [ + '新闻信息流', + '历史事件对比', + '事件传导链分析(AI)', + '事件-相关标的分析', + '相关概念展示', + '板块深度分析(AI)', + 'AI复盘功能', + '企业概览', + '个股深度分析(AI) - 无限制', + '高效数据筛选工具', + '概念中心(548大概念)', + '历史时间轴查询 - 无限制', + '概念高频更新', + '涨停板块数据分析', + '个股涨停分析' + ], + sort_order: 2 + } + ]; + + console.log('[Mock] 获取订阅套餐列表:', plans.length, '个套餐'); + + return HttpResponse.json({ + success: true, + data: plans + }); + }), ]; diff --git a/src/views/Pages/Account/subscription-content.tsx b/src/views/Pages/Account/subscription-content.tsx index 74c6819d..cdd1575a 100644 --- a/src/views/Pages/Account/subscription-content.tsx +++ b/src/views/Pages/Account/subscription-content.tsx @@ -27,7 +27,7 @@ export const subscriptionConfig = { { name: 'pro', displayName: 'Pro 专业版', - description: '为专业投资者打造,解锁高级分析功能', + description: '事件关联股票深度分析 | 历史事件智能对比复盘 | 事件概念关联与挖掘 | 概念板块个股追踪 | 概念深度研报与解读 | 个股异动实时预警', icon: 'gem', badge: '推荐', badgeColor: 'gold', @@ -88,7 +88,7 @@ export const subscriptionConfig = { { name: 'max', displayName: 'Max 旗舰版', - description: '旗舰级体验,无限制使用所有功能', + description: '包含Pro版全部功能 | 事件传导链路智能分析 | 概念演变时间轴追溯 | 个股全方位深度研究 | 价小前投研助手无限使用 | 新功能优先体验权 | 专属客服一对一服务', icon: 'crown', badge: '最受欢迎', badgeColor: 'gold',