From f886a511101f34e5945107cb10b80312eb03fd8b Mon Sep 17 00:00:00 2001 From: Huangzhe Date: Mon, 26 May 2025 14:17:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=97=AE=E5=8D=B7=20iframe=20=E9=80=82?= =?UTF-8?q?=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 iframe src 属性的拼接方式,使用 encodeURIComponent 对 token 进行编码 - 移除 encodeURI 函数的使用,直接使用拼接好的 url --- .../CreateSurvey/components/IntelligentGeneration/Index.vue | 6 +++--- src/views/Survey/hooks/useSurveyData.ts | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/Home/components/CreateSurvey/components/IntelligentGeneration/Index.vue b/src/views/Home/components/CreateSurvey/components/IntelligentGeneration/Index.vue index 25eed02..3c42071 100644 --- a/src/views/Home/components/CreateSurvey/components/IntelligentGeneration/Index.vue +++ b/src/views/Home/components/CreateSurvey/components/IntelligentGeneration/Index.vue @@ -2,15 +2,15 @@ import { escapeHTML } from '@/utils/stringTranslate'; const host = `https://yiligpt.x.digitalyili.com`; -const path = '/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share'; -const param = `?token=${localStorage.getItem('plantToken')}&source=app`; +const path = '/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share?'; +const param = `token=${encodeURIComponent(localStorage.getItem('plantToken') as string)}&source=app`; const url = host + path + param; // 字符串转义