diff --git a/web/src/pages/admin/Plans.tsx b/web/src/pages/admin/Plans.tsx index 23bf9ff..94f0e24 100644 --- a/web/src/pages/admin/Plans.tsx +++ b/web/src/pages/admin/Plans.tsx @@ -1,6 +1,122 @@ -const Plans = () => ( -
-
套餐管理
开发中...
-
-) +import { Card, Tag, Switch, Button, Table, message } from 'antd' +import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons' + +const plans = [ + { + key: 'basic', name: '基础版', price: 299, color: '#64748b', + features: { seats: '2 坐席', history: '30 天', knowledge: '50 条', stats: '基础报表', api: false, channels: ['网页'], brand: false, dedicated: false }, + tenants: 68, active: true, + }, + { + key: 'pro', name: '专业版', price: 699, color: '#2563eb', recommended: true, + features: { seats: '10 坐席', history: '180 天', knowledge: '500 条', stats: '高级报表', api: true, channels: ['网页', '微信', 'APP'], brand: true, dedicated: false }, + tenants: 52, active: true, + }, + { + key: 'enterprise', name: '企业版', price: 1999, color: '#7c3aed', + features: { seats: '50(可扩展)', history: '永久', knowledge: '不限', stats: '自定义报表', api: true, channels: ['全渠道'], brand: true, dedicated: true }, + tenants: 36, active: true, + }, +] + +const compareData = [ + { label: '月费', basic: '¥299/月', pro: '¥699/月', enterprise: '¥1999/月' }, + { label: '坐席数量', basic: '2', pro: '10', enterprise: '50(可扩展)' }, + { label: '对话记录保存', basic: '30 天', pro: '180 天', enterprise: '永久' }, + { label: '知识库容量', basic: '50 条', pro: '500 条', enterprise: '不限' }, + { label: '数据统计', basic: '基础报表', pro: '高级报表', enterprise: '自定义报表' }, + { label: 'API 接口', basic: '不支持', pro: '基础 API', enterprise: '完整 API' }, + { label: '渠道', basic: '网页', pro: '网页+微信+APP', enterprise: '全渠道' }, + { label: '自定义品牌', basic: '不支持', pro: '支持', enterprise: '支持' }, + { label: '专属客服', basic: '不支持', pro: '不支持', enterprise: '支持' }, +] + +const Plans = () => { + return ( +
+
+

套餐管理

+ +
+ + {/* 套餐卡片 */} +
+ {plans.map(plan => ( + +
+ {plan.name} + {plan.recommended && 推荐} +
+
+ } + > +
+ ¥{plan.price} + /月 +
+
+ {[ + { label: '坐席数量', value: plan.features.seats }, + { label: '对话记录', value: plan.features.history }, + { label: '知识库', value: plan.features.knowledge }, + { label: '统计报表', value: plan.features.stats }, + { label: 'API 接口', value: plan.features.api ? '支持' : '不支持' }, + { label: '渠道', value: plan.features.channels.join('、') }, + { label: '自定义品牌', value: plan.features.brand ? '支持' : '不支持' }, + { label: '专属客服', value: plan.features.dedicated ? '支持' : '不支持' }, + ].map((item, i) => ( +
+ {item.label} + {item.value} +
+ ))} +
+
+ {plan.tenants} 个租户使用 + +
+ + ))} +
+ + {/* 对比表 */} + + {t} }, + { title: '基础版', dataIndex: 'basic', key: 'basic', render: (t: string) => }, + { title: '专业版', dataIndex: 'pro', key: 'pro', render: (t: string) => }, + { title: '企业版', dataIndex: 'enterprise', key: 'enterprise', render: (t: string) => }, + ]} + /> + + + {/* 定价规则 */} + +
    +
  • 按月订阅,年付享受 8 折 优惠
  • +
  • 超出套餐坐席按 ¥49/月/坐席 额外计费
  • +
  • 下架后新租户不可购买该套餐,已购买租户可正常续费
  • +
  • 企业版支持自定义报价,请联系销售团队
  • +
+
+ + ) +} + +function RenderCell({ text }: { text: string }) { + if (text === '不支持') return + if (text === '支持') return + return {text} +} + export default Plans