feature_list_subscription.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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": "用户付费是为了得到音频文件",
  12. "solution": "按音频时长计费,包月=批发价,按量=零售价"
  13. },
  14. "billing_model": {
  15. "unit": "音频时长(分钟)",
  16. "formula": "生成费用 = 音频时长 × 单价",
  17. "speaking_rate": 150,
  18. "cost_per_minute": 4.0,
  19. "pricing_strategy": {
  20. "monthly": "包月批发价 ¥5/分钟(30%利润)",
  21. "pay_as_you_go": "按量零售价 ¥8/分钟(100%利润)"
  22. }
  23. },
  24. "pricing_plan": {
  25. "last_updated": "2026-04-12",
  26. "billing_unit": "audio_minutes",
  27. "core_pricing": {
  28. "cost": 4.0,
  29. "monthly_price": 5.0,
  30. "overage_price": 8.0
  31. },
  32. "tiers": [
  33. {
  34. "id": 0,
  35. "name": "免费版",
  36. "price": 0,
  37. "price_monthly": 0,
  38. "price_yearly": 0,
  39. "description": "适合轻度体验",
  40. "features": [
  41. "每天3次生成",
  42. "每月10分钟音频",
  43. "每次最多2分钟",
  44. "基础音色5种",
  45. "标准音质"
  46. ],
  47. "limits": {
  48. "daily_generations": 3,
  49. "per_generation_limit": 300,
  50. "monthly_minutes": 10,
  51. "overage_enabled": false
  52. },
  53. "pricing": {
  54. "in_quota": "¥5/分钟",
  55. "overage": "不支持超出"
  56. }
  57. },
  58. {
  59. "id": 1,
  60. "name": "入门版",
  61. "price": 19,
  62. "price_monthly": 19,
  63. "price_yearly": 190,
  64. "description": "适合轻度使用",
  65. "recommended": false,
  66. "features": [
  67. "每天10次生成",
  68. "每月30分钟音频",
  69. "每次最多5分钟",
  70. "全部音色",
  71. "高清音质"
  72. ],
  73. "limits": {
  74. "daily_generations": 10,
  75. "per_generation_limit": 750,
  76. "monthly_minutes": 30,
  77. "overage_enabled": true
  78. },
  79. "pricing": {
  80. "in_quota": "¥5/分钟",
  81. "overage": "¥8/分钟"
  82. }
  83. },
  84. {
  85. "id": 2,
  86. "name": "专业版",
  87. "price": 59,
  88. "price_monthly": 59,
  89. "price_yearly": 590,
  90. "description": "适合内容创作者 ⭐推荐",
  91. "recommended": true,
  92. "features": [
  93. "无限制生成",
  94. "每月100分钟音频",
  95. "每次最多10分钟",
  96. "全部音色+定制音色",
  97. "高清音质"
  98. ],
  99. "limits": {
  100. "daily_generations": -1,
  101. "per_generation_limit": 1500,
  102. "monthly_minutes": 100,
  103. "overage_enabled": true
  104. },
  105. "pricing": {
  106. "in_quota": "¥5/分钟",
  107. "overage": "¥7/分钟"
  108. }
  109. },
  110. {
  111. "id": 3,
  112. "name": "旗舰版",
  113. "price": 199,
  114. "price_monthly": 199,
  115. "price_yearly": 1990,
  116. "description": "适合重度使用",
  117. "recommended": false,
  118. "features": [
  119. "无限制生成",
  120. "每月400分钟音频",
  121. "每次最多20分钟",
  122. "全部音色+定制音色",
  123. "高清音质",
  124. "VIP优先队列"
  125. ],
  126. "limits": {
  127. "daily_generations": -1,
  128. "per_generation_limit": 3000,
  129. "monthly_minutes": 400,
  130. "overage_enabled": true
  131. },
  132. "pricing": {
  133. "in_quota": "¥5/分钟",
  134. "overage": "¥6/分钟"
  135. }
  136. },
  137. {
  138. "id": 4,
  139. "name": "企业版",
  140. "price": 599,
  141. "price_monthly": 599,
  142. "price_yearly": 5990,
  143. "description": "适合企业用户",
  144. "recommended": false,
  145. "features": [
  146. "无限制生成",
  147. "每月1500分钟音频",
  148. "每次最多60分钟",
  149. "全部功能",
  150. "专属技术支持",
  151. "批量处理",
  152. "团队管理"
  153. ],
  154. "limits": {
  155. "daily_generations": -1,
  156. "per_generation_limit": 9000,
  157. "monthly_minutes": 1500,
  158. "overage_enabled": true
  159. },
  160. "pricing": {
  161. "in_quota": "¥5/分钟",
  162. "overage": "¥5/分钟"
  163. }
  164. }
  165. ]
  166. },
  167. "features": [
  168. {
  169. "id": 1,
  170. "description": "套餐系统-数据库模型扩展",
  171. "backend_test_steps": [
  172. "1. npx prisma db push - 验证数据库迁移 ✅",
  173. "2. curl http://localhost:3000/api/subscription/plans - 获取套餐列表 ✅",
  174. "3. 验证套餐数据显示正确 ✅"
  175. ],
  176. "frontend_test_steps": [
  177. "1. 打开订阅页面 ✅",
  178. "2. 验证4个套餐卡片显示 ✅",
  179. "3. 验证套餐价格和功能显示正确 ✅"
  180. ],
  181. "status": "done",
  182. "passes": true
  183. },
  184. {
  185. "id": 2,
  186. "description": "套餐系统-套餐API接口",
  187. "backend_test_steps": [
  188. "1. curl http://localhost:3000/api/subscription/plans - 获取所有套餐 ✅",
  189. "2. curl http://localhost:3000/api/subscription/plans/1 - 获取单个套餐详情 ✅",
  190. "3. 验证套餐信息完整 ✅"
  191. ],
  192. "frontend_test_steps": [
  193. "1. 点击套餐卡片 ✅",
  194. "2. 验证套餐详情弹窗显示 ✅",
  195. "3. 验证套餐功能列表显示 ✅"
  196. ],
  197. "status": "done",
  198. "passes": true
  199. },
  200. {
  201. "id": 3,
  202. "description": "Token系统-Token消耗记录表",
  203. "backend_test_steps": [
  204. "1. npx prisma db push - 创建TokenUsage表 ✅",
  205. "2. curl -X POST http://localhost:3000/api/subscription/usage - 记录token使用 ✅",
  206. "3. curl http://localhost:3000/api/subscription/usage - 获取token使用记录 ✅"
  207. ],
  208. "frontend_test_steps": [
  209. "1. 打开个人中心 ✅",
  210. "2. 查看Token使用记录 ✅",
  211. "3. 验证使用量统计显示 ✅"
  212. ],
  213. "status": "done",
  214. "passes": true
  215. },
  216. {
  217. "id": 4,
  218. "description": "Token系统-Token余额查询",
  219. "backend_test_steps": [
  220. "1. curl http://localhost:3000/api/subscription/balance - 获取当前用户token余额 ✅",
  221. "2. 验证返回剩余token数量和配额 ✅",
  222. "3. curl http://localhost:3000/api/subscription/quota - 获取用户配额 ✅"
  223. ],
  224. "frontend_test_steps": [
  225. "1. 首页显示当前配额 ✅",
  226. "2. 创建页面显示剩余token ✅",
  227. "3. 验证配额显示正确 ✅"
  228. ],
  229. "status": "done",
  230. "passes": true
  231. },
  232. {
  233. "id": 5,
  234. "description": "Token系统-Token扣费逻辑",
  235. "backend_test_steps": [
  236. "1. curl -X POST http://localhost:3000/api/tts - 生成音频时验证token扣费 (待集成)",
  237. "2. 检查数据库TokenUsage表记录 (待集成)",
  238. "3. 验证token不足时的错误处理 (待集成)"
  239. ],
  240. "frontend_test_steps": [
  241. "1. 生成音频后查看Token消耗 (待集成)",
  242. "2. 验证使用量实时更新 (待集成)",
  243. "3. 验证余额不足提示 (待集成)"
  244. ],
  245. "status": "pending",
  246. "passes": false
  247. },
  248. {
  249. "id": 6,
  250. "description": "支付系统-支付宝集成",
  251. "backend_test_steps": [
  252. "1. 配置支付宝沙箱环境 (待配置)",
  253. "2. curl -X POST http://localhost:3000/api/payment/alipay - 创建支付宝订单 (接口已就绪)",
  254. "3. 验证返回支付宝支付链接 (待配置)",
  255. "4. curl http://localhost:3000/api/payment/alipay/callback - 模拟回调 (接口已就绪)"
  256. ],
  257. "frontend_test_steps": [
  258. "1. 选择基础版套餐 ✅",
  259. "2. 点击支付宝支付 ✅",
  260. "3. 验证跳转到支付宝页面 (待配置真实支付)"
  261. ],
  262. "status": "pending",
  263. "passes": false
  264. },
  265. {
  266. "id": 7,
  267. "description": "支付系统-微信支付集成",
  268. "backend_test_steps": [
  269. "1. 配置微信支付沙箱环境 (待配置)",
  270. "2. curl -X POST http://localhost:3000/api/payment/wechat - 创建微信支付订单 (接口已就绪)",
  271. "3. 验证返回微信支付二维码 (待配置)",
  272. "4. curl http://localhost:3000/api/payment/wechat/callback - 模拟回调 (接口已就绪)"
  273. ],
  274. "frontend_test_steps": [
  275. "1. 选择专业版套餐 ✅",
  276. "2. 点击微信支付 ✅",
  277. "3. 验证显示微信二维码 (待配置真实支付)"
  278. ],
  279. "status": "pending",
  280. "passes": false
  281. },
  282. {
  283. "id": 8,
  284. "description": "支付系统-支付回调处理",
  285. "backend_test_steps": [
  286. "1. 实现支付宝异步回调 ✅",
  287. "2. 实现微信支付异步回调 ✅",
  288. "3. 验证订单状态更新 ✅",
  289. "4. 验证会员状态和token配额更新 ✅"
  290. ],
  291. "frontend_test_steps": [
  292. "1. 支付完成后验证页面跳转 ✅",
  293. "2. 验证会员状态更新 ✅",
  294. "3. 验证Token配额更新 ✅"
  295. ],
  296. "status": "done",
  297. "passes": true
  298. },
  299. {
  300. "id": 9,
  301. "description": "前端-订阅套餐页面",
  302. "backend_test_steps": [],
  303. "frontend_test_steps": [
  304. "1. 打开订阅页面 /pages/subscription/index ✅",
  305. "2. 验证4个套餐卡片显示 ✅",
  306. "3. 点击套餐选择支付方式 ✅",
  307. "4. 验证支付流程完整 ✅"
  308. ],
  309. "status": "done",
  310. "passes": true
  311. },
  312. {
  313. "id": 10,
  314. "description": "前端-Token使用记录页面",
  315. "backend_test_steps": [],
  316. "frontend_test_steps": [
  317. "1. 打开个人中心 /pages/user/index ✅",
  318. "2. 查看Token余额和配额 ✅",
  319. "3. 查看Token使用历史 ✅",
  320. "4. 验证列表分页正常 ✅"
  321. ],
  322. "status": "done",
  323. "passes": true
  324. },
  325. {
  326. "id": 11,
  327. "description": "前端-订单历史页面",
  328. "backend_test_steps": [],
  329. "frontend_test_steps": [
  330. "1. 打开订单历史 /pages/orders/index ✅",
  331. "2. 验证订单列表显示 ✅",
  332. "3. 查看订单详情 ✅",
  333. "4. 验证订单状态标签 ✅"
  334. ],
  335. "status": "done",
  336. "passes": true
  337. },
  338. {
  339. "id": 12,
  340. "description": "前端-套餐推荐和对比页面",
  341. "backend_test_steps": [],
  342. "frontend_test_steps": [
  343. "1. 打开订阅页面 ✅",
  344. "2. 验证套餐对比表显示 ✅",
  345. "3. 验证推荐标识正确 ✅",
  346. "4. 验证价格计算正确 ✅"
  347. ],
  348. "status": "done",
  349. "passes": true
  350. }
  351. ]
  352. }