From 5ef0f5a629fec37696baf3f955561ea7b0c71e40 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 17 Sep 2020 11:34:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E7=8E=AF=E5=A2=83url=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/components/ApiScenarioForm.vue | 2 +- .../api/test/components/request/ApiHttpRequestForm.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue index fdc167dffd..ae4345a615 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue @@ -9,7 +9,7 @@ {{ $t('api_test.environment.environment_config') }} diff --git a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue index c9a8353c5c..a2b6e16462 100644 --- a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue @@ -148,7 +148,7 @@ export default { if (!this.request.path) return; let url = this.getURL(this.displayUrl); let urlStr = url.origin + url.pathname; - let envUrl = this.request.environment.protocol + '://' + this.request.environment.socket; + let envUrl = this.request.environment.config.httpConfig.protocol + '://' + this.request.environment.config.httpConfig.socket; this.request.path = decodeURIComponent(urlStr.substring(envUrl.length, urlStr.length)); }, getURL(urlStr) { @@ -194,7 +194,8 @@ export default { return this.request.method !== "GET"; }, displayUrl() { - return this.request.environment ? this.request.environment.protocol + '://' + this.request.environment.socket + (this.request.path ? this.request.path : '') : ''; + return this.request.environment.config.httpConfig.socket ? this.request.environment.config.httpConfig.protocol + '://' + + this.request.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '') : ''; } } }