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

This commit is contained in:
zwjamnsss 2017-09-21 17:39:47 +08:00
commit 7bb3a18ca1
3 changed files with 5 additions and 4 deletions

View File

@ -136,7 +136,7 @@ class ProjectData extends Component {
<div className="m-panel">
<div className="postman-dataImport">
<div className="dataImportCon">
<div ><h3>数据导入</h3></div>
<div ><h3>数据导入&nbsp;<a target="_blank" rel="noopener noreferrer" title="点击查看文档" href="https://yapi.ymfe.org/data.html" ><Icon type="question-circle-o" /></a></h3></div>
<div className="dataImportTile">
<Select placeholder="请选择导入数据的方式" onChange={this.handleImportType}>
{Object.keys(importDataModule).map((name) => {

View File

@ -3,7 +3,7 @@ import React, { Component } from 'react'
import axios from 'axios'
import PropTypes from 'prop-types'
import { withRouter } from 'react-router-dom';
import { Form, Switch, Button, message } from 'antd';
import { Form, Switch, Button, message, Icon } from 'antd';
import mockEditor from 'client/containers/Project/Interface/InterfaceList/mockEditor';
const FormItem = Form.Item;
@ -92,9 +92,10 @@ class AdvMock extends Component {
}
};
return <div style={{ padding: '20px 10px' }}>
<Form onSubmit={this.handleSubmit}>
<FormItem
label="是否开启"
label={<span>是否开启&nbsp;<a target="_blank" rel="noopener noreferrer" title="点击查看文档" href="https://yapi.ymfe.org/mock.html#高级Mock" ><Icon type="question-circle-o" /></a></span>}
{...formItemLayout}
>
<Switch checked={this.state.enable} onChange={this.onChange} checkedChildren="开" unCheckedChildren="关" />

View File

@ -105,7 +105,7 @@ module.exports = async (ctx, next) => {
ctx.set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE")
return ctx.body = 'ok'
}
return ctx.body = yapi.commons.resReturn(null, 404, '不存在的api');
return ctx.body = yapi.commons.resReturn(null, 404, `不存在的api, 当前请求path为 ${newpath} 请求方法为 ${ctx.method} ,请确认是否定义此请求。`);
}
interfaceData = [
await interfaceInst.get(findInterface._id)