From c72cd93e03c6aa75a878bfc6d924ff1e0fffc17c Mon Sep 17 00:00:00 2001 From: "du.meimei" Date: Thu, 29 May 2025 13:55:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor(env):=20=E6=9B=B4=E6=96=B0=20AI=20?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=20URL=20=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=88=A4=E6=96=AD-=20=E6=9B=B4=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=8E=AF=E5=A2=83=E4=B8=8B=E7=9A=84=20AI=20=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=20URL=20-=20=E5=9C=A8=E5=88=9B=E5=BB=BA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=A1=B5=E9=9D=A2=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=88=A4=E6=96=AD=EF=BC=8C=E6=A0=B9=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=8E=AF=E5=A2=83=E4=BD=BF=E7=94=A8=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.prod | 3 ++- src/views/ProjectManage/create/Index.vue | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env.prod b/.env.prod index 95593bd2..090e9990 100644 --- a/.env.prod +++ b/.env.prod @@ -14,4 +14,5 @@ VUE_APP_JSONPURL = 'https://iam.digitalyili.com/idp/restful/getIDPToken' VUE_APP_YQRURL = 'https://ocp.digitalyili.com' # 伊调研问卷助手 -VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share' \ No newline at end of file +# VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share' +VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/1179e9d7-fb94-4fe4-abbb-55be8f8ca5d6/share' diff --git a/src/views/ProjectManage/create/Index.vue b/src/views/ProjectManage/create/Index.vue index 5adde26b..1b3dff37 100644 --- a/src/views/ProjectManage/create/Index.vue +++ b/src/views/ProjectManage/create/Index.vue @@ -329,9 +329,13 @@ const aiAssistantUrlWithToken = computed(() => { // 使用 encodeURIComponent 转义 token const encodedToken = encodeURIComponent(token.value); - -// 使用 URL 对象安全拼接参数 - const url = new URL( window.location.origin + '/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share'); + let env = process.env.VUE_APP_CURRENTMODE + let url = '' + if (env === 'prod'){ + url = new URL( window.location.origin + '/aiagent/assistant/1179e9d7-fb94-4fe4-abbb-55be8f8ca5d6/share'); + }else{ + url = new URL( window.location.origin + '/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share'); + } url.searchParams.append('token', encodedToken); url.searchParams.append('source', 'pc'); return url.toString();