From 7490298dedc7fe38b42d862e61cb23ddb6f315a6 Mon Sep 17 00:00:00 2001
From: shenaowei <450702724@qq.com>
Date: Tue, 24 Feb 2026 21:47:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../web-gold/src/views/kling/IdentifyFace.vue | 50 +++++++++++++------
.../kling/hooks/pipeline/useSimplePipeline.ts | 40 +++++----------
2 files changed, 48 insertions(+), 42 deletions(-)
diff --git a/frontend/app/web-gold/src/views/kling/IdentifyFace.vue b/frontend/app/web-gold/src/views/kling/IdentifyFace.vue
index d72894ab10..c015b7ec08 100644
--- a/frontend/app/web-gold/src/views/kling/IdentifyFace.vue
+++ b/frontend/app/web-gold/src/views/kling/IdentifyFace.vue
@@ -156,7 +156,7 @@
- {{ isPipelineBusy ? '处理中...' : '生成配音并验证' }}
+ {{ isPipelineBusy ? pipelineStateLabel + '...' : '生成数字人视频' }}
-
- {{ isPipelineBusy ? '处理中...' : '生成数字人视频' }}
-
+
@@ -252,6 +245,7 @@ const {
// Pipeline 状态(单一状态源)
pipelineState,
+ pipelineStateLabel,
isPipelineBusy,
isPipelineReady,
isPipelineFailed,
@@ -269,7 +263,6 @@ const {
handleVideoSelect,
handleVideoLoaded,
replaceVideo,
- generateDigitalHuman,
// UI 辅助方法
formatDuration,
@@ -706,6 +699,35 @@ onMounted(async () => {
}
}
+.completed-tip {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 16px;
+ padding: 12px 16px;
+ background: #F0FDF4;
+ border: 1px solid #86EFAC;
+ border-radius: 8px;
+ color: #166534;
+ font-size: 14px;
+ font-weight: 500;
+
+ .reset-btn {
+ padding: 4px 12px;
+ font-size: 13px;
+ color: #3B82F6;
+ border: 1px solid #3B82F6;
+ border-radius: 4px;
+ background: transparent;
+ cursor: pointer;
+ transition: all 0.2s;
+
+ &:hover {
+ background: rgba(59, 130, 246, 0.1);
+ }
+ }
+}
+
// 预览面板
.preview-card {
position: sticky;
diff --git a/frontend/app/web-gold/src/views/kling/hooks/pipeline/useSimplePipeline.ts b/frontend/app/web-gold/src/views/kling/hooks/pipeline/useSimplePipeline.ts
index 547f9914f5..81007c09a7 100644
--- a/frontend/app/web-gold/src/views/kling/hooks/pipeline/useSimplePipeline.ts
+++ b/frontend/app/web-gold/src/views/kling/hooks/pipeline/useSimplePipeline.ts
@@ -188,26 +188,8 @@ export function useSimplePipeline(options: PipelineOptions) {
}
context.value.validationPassed = true
- // 到达 ready 状态
- setState('ready')
-
- } catch {
- // 错误已在各步骤中处理
- }
- }
-
- /**
- * 创建数字人任务(从 ready 状态)
- */
- async function createTask(): Promise {
- if (state.value !== 'ready') {
- message.warning('请先完成视频识别和音频生成')
- return
- }
-
- try {
+ // 步骤5: 自动创建任务(校验通过后直接继续)
setState('creating')
-
const taskData: LipSyncTaskData = {
taskName: `数字人任务_${Date.now()}`,
videoFileId: context.value.videoFileId!,
@@ -229,16 +211,19 @@ export function useSimplePipeline(options: PipelineOptions) {
sound_end_time: context.value.audioDurationMs!,
}
- const res = await createLipSyncTask(taskData)
- if (res.code !== 0) {
- throw new Error(res.msg || '任务创建失败')
+ try {
+ const res = await createLipSyncTask(taskData)
+ if (res.code !== 0) {
+ throw new Error(res.msg || '任务创建失败')
+ }
+ setState('completed')
+ message.success('任务已提交,请在任务中心查看生成进度')
+ } catch (err) {
+ setError(err as Error)
}
- setState('completed')
- message.success('任务已提交,请在任务中心查看生成进度')
-
- } catch (err) {
- setError(err as Error)
+ } catch {
+ // 错误已在各步骤中处理
}
}
@@ -301,7 +286,6 @@ export function useSimplePipeline(options: PipelineOptions) {
// 方法
run,
- createTask,
retry,
reset,
getExecutionState,