fix(接口自动化): 自定义请求步骤不能执行

This commit is contained in:
shiziyuan9527 2021-03-08 18:37:42 +08:00
parent add62bacaa
commit c59cc92f28
1 changed files with 9 additions and 6 deletions

View File

@ -251,16 +251,19 @@
this.reload();
},
run() {
if (!this.envMap || this.envMap.size === 0) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
} else if (this.envMap && this.envMap.size > 0) {
const env = this.envMap.get(this.request.projectId);
if (!env) {
if (this.isApiImport) {
if (!this.envMap || this.envMap.size === 0) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
} else if (this.envMap && this.envMap.size > 0) {
const env = this.envMap.get(this.request.projectId);
if (!env) {
this.$warning("请在环境配置中为该步骤所属项目选择运行环境!");
return false;
}
}
}
this.request.active = true;
this.loading = true;
this.runData = [];