fix(接口测试): http请求页面报错

This commit is contained in:
chenjianxing 2020-09-17 17:51:16 +08:00
parent 1b36e3302a
commit 884ae86d91
1 changed files with 3 additions and 2 deletions

View File

@ -194,8 +194,9 @@ export default {
return this.request.method !== "GET";
},
displayUrl() {
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 : '') : '';
return (this.request.environment && this.request.environment.config.httpConfig.socket) ?
this.request.environment.config.httpConfig.protocol + '://' + this.request.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '')
: '';
}
}
}