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 ccaadc62b9..c85e6213ce 100644 --- a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue @@ -43,13 +43,15 @@ - - + + + @@ -80,15 +82,15 @@ export default { } }, - data() { - let validateURL = (rule, value, callback) => { - try { - new URL(this.addProtocol(this.request.url)); - } catch (e) { - callback(this.$t('api_test.request.url_invalid')); - } - }; - return { + data() { + let validateURL = (rule, value, callback) => { + try { + new URL(this.addProtocol(this.request.url)); + } catch (e) { + callback(this.$t('api_test.request.url_invalid')); + } + }; + return { activeName: "parameters", rules: { name: [ diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index 715d08df44..cae30e5ad5 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -722,6 +722,8 @@ class JMXHttpRequest { }); for (let i = 0; i < parameters.length; i++) { let parameter = parameters[i]; + // 非 GET 请求中出现了 url 参数 + parameter.value = calculate(parameter.value); path += (parameter.name + '=' + parameter.value); if (i !== parameters.length - 1) { path += '&';