From a64de667a2feb0da80475dbb9bfda96373d457e5 Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Wed, 8 Apr 2026 15:06:44 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20configparams=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E6=9C=89=E5=8F=82=E6=95=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/agent/components/Agent.vue | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/views/home/agent/components/Agent.vue b/src/views/home/agent/components/Agent.vue index 904fea2..026daf8 100644 --- a/src/views/home/agent/components/Agent.vue +++ b/src/views/home/agent/components/Agent.vue @@ -131,9 +131,9 @@ if (initialData) { // 等待页面渲染完成后自动发送初始消息 params.configParams = { - type: initialData.type, - region: initialData.area, - style: initialData.style, + type: initialData.type || '', + region: initialData.area || '', + style: initialData.style || '', temperature: 0.7 } params.needSuggestion = initialData.needSuggestion || false @@ -227,9 +227,7 @@ configParams: JSON.stringify(params.configParams) }) const BASEURL = import.meta.env.VITE_APP_URL - // console.log('params', params) - - // debugger + const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, { method: 'GET', signal: abortController.signal @@ -636,11 +634,11 @@ params.versionID = '' sketchList.value = [] params.useReport = false - + if (project) { - params.configParams.type = project.type - params.configParams.region = project.area - params.configParams.style = project.style + params.configParams.type = project.type || '' + params.configParams.region = project.area || '' + params.configParams.style = project.style || '' params.configParams.temperature = project.temperature params.projectID = project.id }