Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
suxiaoxin 2018-04-16 19:56:19 +08:00
commit a78512caca
5 changed files with 20 additions and 10 deletions

View File

@ -7,6 +7,11 @@
* 增加接口编辑返回数据预览
* 修复旧的文档链接
#### Bug Fixed
* 导入数据为空提示
### v1.3.8
#### Feature

View File

@ -145,7 +145,10 @@ class ProjectData extends Component {
let count = 0;
let successNum = len;
let existNum = 0;
if(len === 0){
message.error(`解析数据为空`);
return;
}
for (let index = 0; index < res.length; index++) {
let item = res[index];
let data = {

View File

@ -42,7 +42,8 @@ function postman(importDataModule){
if(query&&query.length){
for(let item in query){
res.push({
name: query[item].name
name: query[item].name,
value: query[item].value
});
}
}
@ -69,6 +70,7 @@ function postman(importDataModule){
for(let item in body_form){
res.push({
name: body_form[item].name,
value: body_form[item].value,
type: 'text'
});
}
@ -93,11 +95,12 @@ function postman(importDataModule){
try{
res = JSON.parse(res);
res = res.log.entries;
res = res.filter(item=>{
if(!item)return false;
return item.response.content.mimeType.indexOf('application/json') === 0;
})
let interfaceData = {apis: []};
res = checkInterRepeat.bind(this)(res);
@ -107,7 +110,7 @@ function postman(importDataModule){
interfaceData.apis.push(data);
}
}
return interfaceData;
}catch(e){

9
package-lock.json generated
View File

@ -10450,9 +10450,9 @@
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-editor-visual": {
"version": "1.0.8",
"resolved": "http://registry.npm.taobao.org/json-schema-editor-visual/download/json-schema-editor-visual-1.0.8.tgz",
"integrity": "sha1-i2nWHjdyj6QHudV/iY7Sz4i0He8=",
"version": "1.0.9",
"resolved": "http://registry.npm.taobao.org/json-schema-editor-visual/download/json-schema-editor-visual-1.0.9.tgz",
"integrity": "sha1-AOgMJo5lCK2KREj28DHC1YbpFAw=",
"dev": true,
"requires": {
"antd": "3.2.2",
@ -18715,8 +18715,7 @@
"safe-json-stringify": {
"version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/safe-json-stringify/download/safe-json-stringify-1.1.0.tgz",
"integrity": "sha1-vSttrR66+rPCRnKjlVJ/AYBLfhk=",
"optional": true
"integrity": "sha1-vSttrR66+rPCRnKjlVJ/AYBLfhk="
},
"safe-regex": {
"version": "1.1.0",

View File

@ -108,7 +108,7 @@
"fast-sass-loader-china": "1.2.5",
"ghooks": "^2.0.0",
"happypack": "^4.0.0-beta.5",
"json-schema-editor-visual": "^1.0.8",
"json-schema-editor-visual": "^1.0.9",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"markdown-it-include": "^1.0.0",