feat(viral-video): 爆款视频积分动态预估(estimate-credits) #2151
Reference in New Issue
Block a user
Delete Branch "feat/viral-video-dynamic-credits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
变更说明
按需求对接爆款视频动态定价:
新增接口封装
src/api/viral-video/index.ts:estimateViralVideoCredits({ video_model, resolution, video_ratio, duration })/api/v1/viral-video/estimate-credits{ estimated_credits: number }TabTask 增加两个字段:
estimatedCredits: number | null— 预估值,null=未加载estimatedCreditsError: boolean— 接口失败标记调用时机(防抖300ms):
UI 展示:
… 积分X 积分(X 为 estimated_credits)-- 积分(不阻断任何操作,不弹错误 toast)402 积分不足处理:
验证
npx tsc --noEmit✅ 零错误npx prettier --write✅npx vite build✅(6.48s,ViralVideoPage 53.12 kB gzip 17.27 kB)注意
/api/v1/viral-video/estimate-credits接口若尚未就绪,前端会显示「-- 积分」兜底,不影响其他流程;接口上线后自动生效。🚀 预览环境已部署
cfa4d8e68fto87cd9a5300CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #2151 已关闭或合并,对应的预览环境已被清理。