refactor(接口测试): 环境的环境域名末尾不自动添加/

This commit is contained in:
chenjianxing 2020-10-21 18:06:27 +08:00
parent 0b6ee308eb
commit 6fffba9976
1 changed files with 3 additions and 2 deletions

View File

@ -58,10 +58,11 @@
this.httpConfig.domain = decodeURIComponent(url.hostname);
this.httpConfig.port = url.port;
let path = url.pathname === '/' ? '' : url.pathname;
if (url.port) {
this.httpConfig.socket = this.httpConfig.domain + ':' + url.port + url.pathname;
this.httpConfig.socket = this.httpConfig.domain + ':' + url.port + path;
} else {
this.httpConfig.socket = this.httpConfig.domain + url.pathname;
this.httpConfig.socket = this.httpConfig.domain + path;
}
return true;
},