feature_list_subscription.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. {
  2. "project_name": "AI语音应用-订阅支付系统",
  3. "base_config": {
  4. "backend_port": 3000,
  5. "frontend_port": 8080,
  6. "db_host": "localhost",
  7. "db_port": 3306,
  8. "auth_enabled": false
  9. },
  10. "design_overview": {
  11. "problem": "当前系统只有简单的包月/包年会员,没有token计费系统,无法精细控制资源消耗",
  12. "solution": "设计多层级套餐体系,结合包月订阅和token配额,实现精细化资源管理"
  13. },
  14. "pricing_plan": {
  15. "last_updated": "2026-04-12",
  16. "tts_cost_basis": {
  17. "ai_model_cost": "¥2-4/千token",
  18. "tts_provider_cost": "¥0-50/千字符",
  19. "total_cost_range": "¥3.5-55/千字符"
  20. },
  21. "tiers": [
  22. {
  23. "id": 0,
  24. "name": "免费版",
  25. "price": 0,
  26. "price_monthly": 0,
  27. "price_yearly": 0,
  28. "description": "适合轻度体验",
  29. "features": [
  30. "每天3次生成",
  31. "每次最多2000字",
  32. "基础音色5种",
  33. "标准音质",
  34. "科大讯飞免费额度(10万/月永久)"
  35. ],
  36. "limits": {
  37. "daily_generations": 3,
  38. "per_generation_limit": 2000,
  39. "monthly_tokens": 5000,
  40. "voice_options": 5,
  41. "audio_quality": "standard"
  42. },
  43. "cost_analysis": {
  44. "token_cost": 17.5,
  45. "tts_provider": "科大讯飞-基础版",
  46. "profit": -17.5,
  47. "strategy": "平台补贴引流"
  48. }
  49. },
  50. {
  51. "id": 1,
  52. "name": "入门版",
  53. "price": 9.9,
  54. "price_monthly": 9.9,
  55. "price_yearly": 99,
  56. "description": "适合日常使用",
  57. "recommended": false,
  58. "features": [
  59. "每月10000 Token",
  60. "每次最多5000字",
  61. "全部音色",
  62. "高清音质",
  63. "百度基础版TTS(¥3/千字符)"
  64. ],
  65. "limits": {
  66. "daily_generations": 10,
  67. "per_generation_limit": 5000,
  68. "monthly_tokens": 10000,
  69. "voice_options": -1,
  70. "audio_quality": "high"
  71. },
  72. "cost_analysis": {
  73. "token_cost": 35,
  74. "tts_provider": "百度智能云-基础版",
  75. "profit": -25.1,
  76. "strategy": "亏损获客转化"
  77. }
  78. },
  79. {
  80. "id": 2,
  81. "name": "专业版",
  82. "price": 49,
  83. "price_monthly": 49,
  84. "price_yearly": 490,
  85. "description": "适合内容创作者",
  86. "recommended": true,
  87. "features": [
  88. "每月30000 Token",
  89. "每次最多20000字",
  90. "全部音色+定制音色",
  91. "高清音质",
  92. "百度精品版TTS(¥15/千字符)",
  93. "VIP优先队列"
  94. ],
  95. "limits": {
  96. "daily_generations": -1,
  97. "per_generation_limit": 20000,
  98. "monthly_tokens": 30000,
  99. "voice_options": -1,
  100. "audio_quality": "lossless",
  101. "api_access": false
  102. },
  103. "cost_analysis": {
  104. "token_cost": 105,
  105. "tts_provider": "百度智能云-精品版",
  106. "profit": -56,
  107. "strategy": "核心转化产品"
  108. }
  109. },
  110. {
  111. "id": 3,
  112. "name": "旗舰版",
  113. "price": 199,
  114. "price_monthly": 199,
  115. "price_yearly": 1999,
  116. "description": "适合企业用户",
  117. "recommended": false,
  118. "features": [
  119. "每月100000 Token",
  120. "每次最多100000字",
  121. "全部功能",
  122. "无损音质",
  123. "火山引擎豆包TTS(¥50/千字符)",
  124. "专属技术支持",
  125. "批量处理",
  126. "团队管理"
  127. ],
  128. "limits": {
  129. "daily_generations": -1,
  130. "per_generation_limit": 100000,
  131. "monthly_tokens": 100000,
  132. "voice_options": -1,
  133. "audio_quality": "lossless",
  134. "api_access": true,
  135. "batch_processing": true,
  136. "team_management": true
  137. },
  138. "cost_analysis": {
  139. "token_cost": 350,
  140. "tts_provider": "火山引擎豆包",
  141. "profit": -151,
  142. "suggestion": "建议定价¥399-499/月",
  143. "strategy": "高端产品需涨价"
  144. }
  145. }
  146. ],
  147. "token_pricing": {
  148. "text_to_speech": 3.5,
  149. "per_char": 0.0035
  150. }
  151. },
  152. "features": [
  153. {
  154. "id": 1,
  155. "description": "套餐系统-数据库模型扩展",
  156. "backend_test_steps": [
  157. "1. npx prisma db push - 验证数据库迁移 ✅",
  158. "2. curl http://localhost:3000/api/subscription/plans - 获取套餐列表 ✅",
  159. "3. 验证套餐数据显示正确 ✅"
  160. ],
  161. "frontend_test_steps": [
  162. "1. 打开订阅页面 ✅",
  163. "2. 验证4个套餐卡片显示 ✅",
  164. "3. 验证套餐价格和功能显示正确 ✅"
  165. ],
  166. "status": "done",
  167. "passes": true
  168. },
  169. {
  170. "id": 2,
  171. "description": "套餐系统-套餐API接口",
  172. "backend_test_steps": [
  173. "1. curl http://localhost:3000/api/subscription/plans - 获取所有套餐 ✅",
  174. "2. curl http://localhost:3000/api/subscription/plans/1 - 获取单个套餐详情 ✅",
  175. "3. 验证套餐信息完整 ✅"
  176. ],
  177. "frontend_test_steps": [
  178. "1. 点击套餐卡片 ✅",
  179. "2. 验证套餐详情弹窗显示 ✅",
  180. "3. 验证套餐功能列表显示 ✅"
  181. ],
  182. "status": "done",
  183. "passes": true
  184. },
  185. {
  186. "id": 3,
  187. "description": "Token系统-Token消耗记录表",
  188. "backend_test_steps": [
  189. "1. npx prisma db push - 创建TokenUsage表 ✅",
  190. "2. curl -X POST http://localhost:3000/api/subscription/usage - 记录token使用 ✅",
  191. "3. curl http://localhost:3000/api/subscription/usage - 获取token使用记录 ✅"
  192. ],
  193. "frontend_test_steps": [
  194. "1. 打开个人中心 ✅",
  195. "2. 查看Token使用记录 ✅",
  196. "3. 验证使用量统计显示 ✅"
  197. ],
  198. "status": "done",
  199. "passes": true
  200. },
  201. {
  202. "id": 4,
  203. "description": "Token系统-Token余额查询",
  204. "backend_test_steps": [
  205. "1. curl http://localhost:3000/api/subscription/balance - 获取当前用户token余额 ✅",
  206. "2. 验证返回剩余token数量和配额 ✅",
  207. "3. curl http://localhost:3000/api/subscription/quota - 获取用户配额 ✅"
  208. ],
  209. "frontend_test_steps": [
  210. "1. 首页显示当前配额 ✅",
  211. "2. 创建页面显示剩余token ✅",
  212. "3. 验证配额显示正确 ✅"
  213. ],
  214. "status": "done",
  215. "passes": true
  216. },
  217. {
  218. "id": 5,
  219. "description": "Token系统-Token扣费逻辑",
  220. "backend_test_steps": [
  221. "1. curl -X POST http://localhost:3000/api/tts - 生成音频时验证token扣费 (待集成)",
  222. "2. 检查数据库TokenUsage表记录 (待集成)",
  223. "3. 验证token不足时的错误处理 (待集成)"
  224. ],
  225. "frontend_test_steps": [
  226. "1. 生成音频后查看Token消耗 (待集成)",
  227. "2. 验证使用量实时更新 (待集成)",
  228. "3. 验证余额不足提示 (待集成)"
  229. ],
  230. "status": "pending",
  231. "passes": false
  232. },
  233. {
  234. "id": 6,
  235. "description": "支付系统-支付宝集成",
  236. "backend_test_steps": [
  237. "1. 配置支付宝沙箱环境 (待配置)",
  238. "2. curl -X POST http://localhost:3000/api/payment/alipay - 创建支付宝订单 (接口已就绪)",
  239. "3. 验证返回支付宝支付链接 (待配置)",
  240. "4. curl http://localhost:3000/api/payment/alipay/callback - 模拟回调 (接口已就绪)"
  241. ],
  242. "frontend_test_steps": [
  243. "1. 选择基础版套餐 ✅",
  244. "2. 点击支付宝支付 ✅",
  245. "3. 验证跳转到支付宝页面 (待配置真实支付)"
  246. ],
  247. "status": "pending",
  248. "passes": false
  249. },
  250. {
  251. "id": 7,
  252. "description": "支付系统-微信支付集成",
  253. "backend_test_steps": [
  254. "1. 配置微信支付沙箱环境 (待配置)",
  255. "2. curl -X POST http://localhost:3000/api/payment/wechat - 创建微信支付订单 (接口已就绪)",
  256. "3. 验证返回微信支付二维码 (待配置)",
  257. "4. curl http://localhost:3000/api/payment/wechat/callback - 模拟回调 (接口已就绪)"
  258. ],
  259. "frontend_test_steps": [
  260. "1. 选择专业版套餐 ✅",
  261. "2. 点击微信支付 ✅",
  262. "3. 验证显示微信二维码 (待配置真实支付)"
  263. ],
  264. "status": "pending",
  265. "passes": false
  266. },
  267. {
  268. "id": 8,
  269. "description": "支付系统-支付回调处理",
  270. "backend_test_steps": [
  271. "1. 实现支付宝异步回调 ✅",
  272. "2. 实现微信支付异步回调 ✅",
  273. "3. 验证订单状态更新 ✅",
  274. "4. 验证会员状态和token配额更新 ✅"
  275. ],
  276. "frontend_test_steps": [
  277. "1. 支付完成后验证页面跳转 ✅",
  278. "2. 验证会员状态更新 ✅",
  279. "3. 验证Token配额更新 ✅"
  280. ],
  281. "status": "done",
  282. "passes": true
  283. },
  284. {
  285. "id": 9,
  286. "description": "前端-订阅套餐页面",
  287. "backend_test_steps": [],
  288. "frontend_test_steps": [
  289. "1. 打开订阅页面 /pages/subscription/index ✅",
  290. "2. 验证4个套餐卡片显示 ✅",
  291. "3. 点击套餐选择支付方式 ✅",
  292. "4. 验证支付流程完整 ✅"
  293. ],
  294. "status": "done",
  295. "passes": true
  296. },
  297. {
  298. "id": 10,
  299. "description": "前端-Token使用记录页面",
  300. "backend_test_steps": [],
  301. "frontend_test_steps": [
  302. "1. 打开个人中心 /pages/user/index ✅",
  303. "2. 查看Token余额和配额 ✅",
  304. "3. 查看Token使用历史 ✅",
  305. "4. 验证列表分页正常 ✅"
  306. ],
  307. "status": "done",
  308. "passes": true
  309. },
  310. {
  311. "id": 11,
  312. "description": "前端-订单历史页面",
  313. "backend_test_steps": [],
  314. "frontend_test_steps": [
  315. "1. 打开订单历史 /pages/orders/index ✅",
  316. "2. 验证订单列表显示 ✅",
  317. "3. 查看订单详情 ✅",
  318. "4. 验证订单状态标签 ✅"
  319. ],
  320. "status": "done",
  321. "passes": true
  322. },
  323. {
  324. "id": 12,
  325. "description": "前端-套餐推荐和对比页面",
  326. "backend_test_steps": [],
  327. "frontend_test_steps": [
  328. "1. 打开订阅页面 ✅",
  329. "2. 验证套餐对比表显示 ✅",
  330. "3. 验证推荐标识正确 ✅",
  331. "4. 验证价格计算正确 ✅"
  332. ],
  333. "status": "done",
  334. "passes": true
  335. }
  336. ]
  337. }