From 9f7bc0aafde2cd810f69538c4b141028207cee8a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 13 Jul 2023 11:13:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E7=8E=AF=E5=A2=83=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=A4=B1=E8=B4=A5=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027765 --user=王孝刚 [项目设置]项目环境-创建环境失败 https://www.tapd.cn/55049933/s/1392740 --- .../src/components/environment/EnvironmentHttpConfig.vue | 1 - .../menu/environment/components/EnvironmentHttpConfig.vue | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index 4760330207..69a0fcb3fb 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -451,7 +451,6 @@ export default { if (socket.startsWith("${")){ let split = socket.split(":"); this.condition.domain = split[0]; - return true; } return true; }, diff --git a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue index ee98550710..3672065a7d 100644 --- a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue +++ b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue @@ -432,6 +432,9 @@ export default { } }, validateSocket(socket) { + if (!socket) { + return true; + } this.condition.socket = socket; let urlStr = this.condition.protocol + "://" + socket; let url = {}; @@ -441,7 +444,7 @@ export default { return true; } this.condition.domain = decodeURIComponent(url.hostname); - if (socket.startsWith("${")){ + if (socket && socket.startsWith("${")){ let split = socket.split(":"); this.condition.domain = split[0]; }