fix(接口测试): 修复更多操作创建接口选择默认模块为空的缺陷

This commit is contained in:
wxg0103 2022-03-22 19:36:47 +08:00 committed by xiaomeinvG
parent 6949e31a78
commit 07f1671ecb
3 changed files with 7 additions and 1 deletions

View File

@ -534,6 +534,9 @@ export default {
if (!this.currentScenario.apiScenarioModuleId) {
this.currentScenario.apiScenarioModuleId = "";
}
if (this.currentScenario.apiScenarioModuleId === 'default-module') {
this.currentScenario.apiScenarioModuleId = this.moduleOptions[0].id;
}
this.debug = false;
this.debugLoading = false;
if (this.stepFilter) {

View File

@ -172,7 +172,7 @@
this.httpForm.request.method = this.httpForm.method;
this.httpForm.request.path = this.httpForm.path;
}
if (this.currentModule != null) {
if (this.currentModule != null && this.currentModule.id) {
this.httpForm.modulePath = this.currentModule.method != undefined ? this.currentModule.method : null;
this.httpForm.moduleId = this.currentModule.id;
} else {

View File

@ -698,6 +698,9 @@ export default {
if (!this.basisData.environmentId) {
this.basisData.environmentId = "";
}
if (this.basisData.moduleId && this.basisData.moduleId === 'default-module') {
this.basisData.moduleId = this.moduleOptions[0].id;
}
this.httpForm = JSON.parse(JSON.stringify(this.basisData));
this.$get('/api/definition/follow/' + this.basisData.id, response => {
this.httpForm.follows = response.data;