feat(viral-video): 模型选择器补充5模型fallback+无声提示+直接使用后端display_name
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m47s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m58s
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Failing after 46s

- ViralVideoModel 类型补充 billing_mode 可选字段
- 兜底模型列表扩充到5个:Seedance 2.5/2.0/2.0 Fast/2.0 Mini/Wan 3.0
- 选项直接使用后端返回的 display_name(已包含🔇标记),不再前端拼接
- 选中不支持音频的模型时,Select 下方显示灰色小字提示「🔇 该模型不支持自动配音,视频为无声」
- tsc & vite build 通过
This commit is contained in:
xiaoxia
2026-10-03 15:32:45 +08:00
parent d7b27c649a
commit dddc6da681
3 changed files with 40 additions and 4 deletions
+2
View File
@@ -287,6 +287,8 @@ export interface ViralVideoModel {
supports_audio: boolean
supported_resolutions: string[]
max_duration: number
/** 计费模式(可选):per_second / per_video 等,后端预留字段 */
billing_mode?: string
is_default?: boolean
}
@@ -1002,6 +1002,11 @@
.vv-form-row {
margin-bottom: 10px;
}
.vv-form-hint {
font-size: 12px;
color: #9ca3af;
line-height: 1.4;
}
@media (max-width: 500px) {
.vv-form-grid {
grid-template-columns: 1fr;
@@ -219,11 +219,11 @@ const RATIOS = [
{ v: "16:9", label: "16:9 横屏(B站/YouTube)" },
{ v: "1:1", label: "1:1 方形(小红书)" },
]
/** 兜底模型列表(接口未返回时使用,字段与 ViralVideoModel 对齐) */
/** 兜底模型列表(接口未返回时使用,字段与 ViralVideoModel 对齐;后端返回后自动覆盖) */
const FALLBACK_VIDEO_MODELS: ViralVideoModel[] = [
{
key: "seedance-2.5",
display_name: "Seedance 2.5(最新模型)",
display_name: "Seedance 2.5 — 最新最强",
supports_audio: true,
supported_resolutions: ["480p", "720p", "1080p"],
max_duration: 30,
@@ -231,7 +231,28 @@ const FALLBACK_VIDEO_MODELS: ViralVideoModel[] = [
},
{
key: "seedance-2.0",
display_name: "Seedance 2.0 完整版(正式投放首选)",
display_name: "Seedance 2.0 — 正式首选",
supports_audio: true,
supported_resolutions: ["480p", "720p", "1080p"],
max_duration: 15,
},
{
key: "seedance-2.0-fast",
display_name: "Seedance 2.0 Fast — 快速测试 🔇",
supports_audio: false,
supported_resolutions: ["480p", "720p"],
max_duration: 15,
},
{
key: "seedance-2.0-mini",
display_name: "Seedance 2.0 Mini — 低成本 💰",
supports_audio: true,
supported_resolutions: ["480p", "720p"],
max_duration: 15,
},
{
key: "wan-3.0",
display_name: "Wan 3.0 — 通义万相全能",
supports_audio: true,
supported_resolutions: ["480p", "720p", "1080p"],
max_duration: 15,
@@ -2359,9 +2380,17 @@ const ViralVideoPage: React.FC = () => {
}}
options={videoModels.map((m) => ({
value: m.key,
label: m.supports_audio ? m.display_name : `${m.display_name} 🔇无声`,
label: m.display_name,
}))}
/>
{(() => {
const curM = videoModels.find((m) => m.key === task.videoModel)
return curM && !curM.supports_audio ? (
<div className="vv-form-hint" style={{ marginTop: 4 }}>
🔇 该模型不支持自动配音,视频为无声
</div>
) : null
})()}
</div>
<div className="vv-form-row">
<label className="vv-label">清晰度</label>