fix: 环境设置beaseUrl

This commit is contained in:
chenjianxing 2020-08-04 17:54:36 +08:00
parent ff76a7e69d
commit 9d293f653e

View File

@ -287,7 +287,7 @@ export class HttpRequest extends Request {
}
}
} else {
if (!this.url) {
if (!this.url) {
return {
isValid: false,
info: 'api_test.request.input_url'
@ -667,7 +667,7 @@ class JMXHttpRequest {
this.protocol = environment.protocol;
this.domain = environment.domain;
let url = new URL(environment.protocol + "://" + environment.socket);
this.path = this.getPostQueryParameters(request, decodeURIComponent(url.pathname));
this.path = this.getPostQueryParameters(request, decodeURIComponent(url.pathname + (request.path ? request.path : '')));
}
}
}
@ -684,7 +684,7 @@ class JMXHttpRequest {
for (let i = 0; i < parameters.length; i++) {
let parameter = parameters[i];
path += (parameter.name + '=' + parameter.value);
if (i != parameters.length -1) {
if (i != parameters.length - 1) {
path += '&';
}
}