feat(接口自动化): 修复缺陷

This commit is contained in:
fit2-zhao 2020-12-10 18:29:32 +08:00
parent 518898658b
commit 069e3105de
1 changed files with 11 additions and 9 deletions

View File

@ -357,16 +357,18 @@
this.apiCaseList.unshift(obj);
},
addCase() {
//
let request = {};
if (this.api.request instanceof Object) {
request = this.api.request;
} else {
request = JSON.parse(this.api.request);
if (this.api.request) {
//
let request = {};
if (this.api.request instanceof Object) {
request = this.api.request;
} else {
request = JSON.parse(this.api.request);
}
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', type: 'create', active: false};
obj.request = request;
this.apiCaseList.unshift(obj);
}
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', type: 'create', active: false};
obj.request = request;
this.apiCaseList.unshift(obj);
},
active(item) {