fix: testCollection form-reqeust-params inject bug

This commit is contained in:
suxiaoxin 2017-10-18 19:51:06 +08:00
parent 6e17470e3e
commit 271a5633e8

View File

@ -162,7 +162,12 @@ class InterfaceColContent extends Component {
}
let body = {};
if(HTTP_METHOD[curitem.method].request_body){
body = isJson(curitem.req_body_other);
if(curitem.req_body_type === 'form'){
body = this.arrToObj(curitem.req_body_form);
}else {
body = isJson(curitem.req_body_other);
}
if(!body || typeof body !== 'object'){
body = {};
}