mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
b072834509
@ -15,7 +15,7 @@ let importDataModule = {};
|
||||
state => {
|
||||
// console.log(state);
|
||||
return {
|
||||
curCatid: state.inter.curdata.catid,
|
||||
curCatid: -(-state.inter.curdata.catid),
|
||||
basePath: state.project.currProject.basepath
|
||||
}
|
||||
}, {
|
||||
|
11
exts/yapi-plugin-postman/client.js
Normal file → Executable file
11
exts/yapi-plugin-postman/client.js
Normal file → Executable file
@ -128,11 +128,16 @@ function postman(obj){
|
||||
}else if(item === "req_body_form"){
|
||||
res[item] = handleReq_body_form.bind(this)(data[reflect[item]]);
|
||||
}else if(item === "req_body_type"){
|
||||
if(data.headers.indexOf('application/json')>-1){
|
||||
res[item] = "json";
|
||||
if(data[reflect[item]] === 'urlencoded' || data[reflect[item]] === 'params'){
|
||||
res[item] = 'form';
|
||||
}else{
|
||||
res[item] = "raw";
|
||||
if(data.headers.indexOf('application/json')>-1){
|
||||
res[item] = "json";
|
||||
}else{
|
||||
res[item] = "raw";
|
||||
}
|
||||
}
|
||||
|
||||
}else if(item === "path"){
|
||||
res[item] = handlePath.bind(this)(data[reflect[item]]);
|
||||
if(res[item] && res[item].indexOf("/:") > -1){
|
||||
|
Loading…
Reference in New Issue
Block a user