From dddc6da681b6389cb389e1caa4b2d4eb3cb38f60 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 3 Oct 2026 15:32:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(viral-video):=20=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=99=A8=E8=A1=A5=E5=85=855=E6=A8=A1?= =?UTF-8?q?=E5=9E=8Bfallback+=E6=97=A0=E5=A3=B0=E6=8F=90=E7=A4=BA+?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8=E5=90=8E=E7=AB=AFdisplay?= =?UTF-8?q?=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ViralVideoModel 类型补充 billing_mode 可选字段 - 兜底模型列表扩充到5个:Seedance 2.5/2.0/2.0 Fast/2.0 Mini/Wan 3.0 - 选项直接使用后端返回的 display_name(已包含🔇标记),不再前端拼接 - 选中不支持音频的模型时,Select 下方显示灰色小字提示「🔇 该模型不支持自动配音,视频为无声」 - tsc & vite build 通过 --- apps/web/src/api/viral-video/types.ts | 2 + .../src/pages/viral-video/ViralVideoPage.css | 5 +++ .../src/pages/viral-video/ViralVideoPage.tsx | 37 +++++++++++++++++-- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/apps/web/src/api/viral-video/types.ts b/apps/web/src/api/viral-video/types.ts index c62678cd8..92a791ec1 100644 --- a/apps/web/src/api/viral-video/types.ts +++ b/apps/web/src/api/viral-video/types.ts @@ -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 } diff --git a/apps/web/src/pages/viral-video/ViralVideoPage.css b/apps/web/src/pages/viral-video/ViralVideoPage.css index 6dc6ece13..aa152c3ca 100644 --- a/apps/web/src/pages/viral-video/ViralVideoPage.css +++ b/apps/web/src/pages/viral-video/ViralVideoPage.css @@ -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; diff --git a/apps/web/src/pages/viral-video/ViralVideoPage.tsx b/apps/web/src/pages/viral-video/ViralVideoPage.tsx index d81a84773..d9c76f48f 100644 --- a/apps/web/src/pages/viral-video/ViralVideoPage.tsx +++ b/apps/web/src/pages/viral-video/ViralVideoPage.tsx @@ -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 ? ( +
+ 🔇 该模型不支持自动配音,视频为无声 +
+ ) : null + })()}