fix(接口自动化): 修复调试时csv不起作用问题

This commit is contained in:
fit2-zhao 2021-01-29 14:45:18 +08:00
parent 43137f54e4
commit fa9a0f6023
1 changed files with 18 additions and 0 deletions

View File

@ -67,6 +67,19 @@
});
}
}
if (item && item.files) {
item.files.forEach(fileItem => {
if (fileItem.file) {
if (!fileItem.id) {
let fileId = getUUID().substring(0, 12);
fileItem.name = fileItem.file.name;
fileItem.id = fileId;
}
obj.bodyUploadIds.push(fileItem.id);
bodyUploadFiles.push(fileItem.file);
}
});
}
},
recursiveFile(arr, bodyUploadFiles, obj) {
arr.forEach(item => {
@ -86,6 +99,11 @@
this.recursiveFile(item.hashTree, bodyUploadFiles, obj);
}
})
if (request.variables) {
request.variables.forEach(item => {
this.setFiles(item, bodyUploadFiles, obj);
})
}
return bodyUploadFiles;
},
run() {