From 8806fbeb493ef81060b30fa5c425ca2f225d6bc3 Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Fri, 10 Apr 2026 15:54:13 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=81=BF=E5=85=8DconfigParams?= =?UTF-8?q?=E5=87=BA=E7=8E=B0null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/agent/components/Agent.vue | 8 +++++++- src/views/home/components/Input.vue | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/home/agent/components/Agent.vue b/src/views/home/agent/components/Agent.vue index e338b76..e2d6465 100644 --- a/src/views/home/agent/components/Agent.vue +++ b/src/views/home/agent/components/Agent.vue @@ -224,7 +224,13 @@ try { const urlParams = new URLSearchParams({ ...params, - configParams: JSON.stringify(params.configParams) + // configParams: JSON.stringify(params.configParams) + configParams: JSON.stringify({ + type: params.configParams.type||'', + region: params.configParams.region||'', + style: params.configParams.style||'', + temperature: params.configParams.temperature + }) }) const BASEURL = import.meta.env.VITE_APP_URL diff --git a/src/views/home/components/Input.vue b/src/views/home/components/Input.vue index 1149da5..36d958c 100644 --- a/src/views/home/components/Input.vue +++ b/src/views/home/components/Input.vue @@ -499,7 +499,7 @@ // 清理掉已被删除的标签引用(从 DOM 中移除的元素) reportTags.value = reportTags.value.filter((tag) => tag.parentNode !== null) - if (reportTags.value.length > 0 ) { + if (reportTags.value.length > 0) { // 移除所有标签及其关联的零宽空格 reportTags.value.forEach((tag) => { if ( @@ -783,9 +783,9 @@ } const params = { - type: typeValue.value, - area: areaValue.value, - style: styleValue.value, + type: typeValue.value || '', + area: areaValue.value || '', + style: styleValue.value || '', useReport: reportTags.value.length > 0, temperature: 0.7 }