From 41c2112c5b03156e1555eeb837dff5c6be978273 Mon Sep 17 00:00:00 2001 From: Peanut Date: Mon, 20 Jul 2026 21:25:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=BE=84=E6=B8=85=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=B7=B2=E5=9B=9E=E7=AD=94=E7=94=A8=20label=20=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E5=90=8E=E7=AB=AF=20payload=20=E4=BB=8D?= =?UTF-8?q?=E7=94=A8=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mini-program/src/pages/main/ScriptView.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mini-program/src/pages/main/ScriptView.vue b/mini-program/src/pages/main/ScriptView.vue index f1f88f8..b60fcf2 100644 --- a/mini-program/src/pages/main/ScriptView.vue +++ b/mini-program/src/pages/main/ScriptView.vue @@ -1747,16 +1747,19 @@ const submitClarification = (answer) => { if (answeringClarification.value) return // 找最后一张未提交的卡片消息(mp-weixin 模板不支持内联箭头函数传 msg,改为自己查找) const card = [...resultMessages.value].reverse().find(m => m.kind === 'card' && !m.submitted) + // 通过 value 查找选项的 label,用于前端显示;后端 payload 仍用 value(语义化) + const option = card?.card?.options?.find(opt => opt.value === answer) + const label = option?.label || answer if (card) { card.submitted = true - card.answer = answer + card.answer = label // 显示用 label(中文) } - addResultMessage({ role: 'user', kind: 'text', content: answer }) + addResultMessage({ role: 'user', kind: 'text', content: label }) answeringClarification.value = true currentStreamTask.value = followupStream({ sessionId: novelSessionId.value, action: 'answer_clarification', - payload: { answer }, + payload: { answer }, // 后端仍收 value onEvent: handleShortNovelEvent, onError: (errMsg) => markGenerationFailed(errMsg) })