fix(旧版本接口测试): 兼容新版本定义的环境
This commit is contained in:
parent
3936d17151
commit
1b9328cc15
|
@ -196,10 +196,12 @@ export default {
|
||||||
let url = null;
|
let url = null;
|
||||||
if(this.scenario.environment && this.scenario.environment.config.httpConfig
|
if(this.scenario.environment && this.scenario.environment.config.httpConfig
|
||||||
&& this.scenario.environment.config.httpConfig.conditions && this.scenario.environment.config.httpConfig.conditions.length > 0){
|
&& this.scenario.environment.config.httpConfig.conditions && this.scenario.environment.config.httpConfig.conditions.length > 0){
|
||||||
for(let i in this.scenario.environment.config.httpConfig.conditions){
|
for(let i in this.scenario.environment.config.httpConfig.conditions) {
|
||||||
let item = this.scenario.environment.config.httpConfig.conditions[i];
|
if (this.scenario.environment.config.httpConfig.conditions[i]) {
|
||||||
if(item.type ==='NONE'){
|
let item = this.scenario.environment.config.httpConfig.conditions[i];
|
||||||
url = item.protocol + '://' + item.socket + (this.request.path ? this.request.path : '');
|
if (item.type === 'NONE') {
|
||||||
|
url = item.protocol + '://' + item.socket + (this.request.path ? this.request.path : '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue