diff --git a/client/containers/Project/Interface/InterfaceList/Run.js b/client/containers/Project/Interface/InterfaceList/Run.js
index b51614a0..a21f0ed1 100644
--- a/client/containers/Project/Interface/InterfaceList/Run.js
+++ b/client/containers/Project/Interface/InterfaceList/Run.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
-import { Button, Input, Select, Card, Alert, Spin, Icon, message, Collapse } from 'antd'
+import { Button, Input, Select, Card, Alert, Spin, Icon, message, Collapse, Radio } from 'antd'
import { autobind } from 'core-decorators';
import crossRequest from 'cross-request';
import { withRouter } from 'react-router';
@@ -17,6 +17,8 @@ const { TextArea } = Input;
const InputGroup = Input.Group;
const Option = Select.Option;
const Panel = Collapse.Panel;
+const RadioButton = Radio.Button;
+const RadioGroup = Radio.Group;
@connect(
state => ({
@@ -376,8 +378,6 @@ export default class Run extends Component {
}
- {/*
{interfaceName}
*/}
-
@@ -421,7 +421,8 @@ export default class Run extends Component {
headers.map((item, index) => {
return (
- this.changeHeader(e, index, true)} className="key" />{' = '}
+ this.changeHeader(e, index, true)} className="key" />
+ =
this.changeHeader(e, index)} className="value" />
this.deleteHeader(index)} />
@@ -447,49 +448,55 @@ export default class Run extends Component {
>
{ method === 'POST' && paramsType !== 'form' && paramsType !== 'file' &&
+
+ JSON
+ TEXT
+ XML
+ HTML
+
-
{paramsType}
}
{
- method === 'POST' && paramsType === 'form' && (
-
- {
- params.map((item, index) => {
- return (
-
- this.changeParams(e, index, 'key')} style={{display: 'inline-block', width: 200, margin: 10}} />
- []{' = '}
- {item.type === 'file' ?
- this.changeParams(e, index, 'value')} multiple style={{display: 'inline-block', width: 200, margin: 10}} /> :
- this.changeParams(e, index, 'value')} style={{display: 'inline-block', width: 200, margin: 10}} />
- }
-
- )
- })
- }
-
-
- )
+ method === 'POST' && paramsType === 'form' &&
+
}
{
- method === 'POST' && paramsType === 'file' && (
-
-
-
- )
+ method === 'POST' && paramsType === 'file' &&
+
+
+
}
{
- method !== 'POST' && (
- GET 请求没有 Body。
- )
+ method !== 'POST' &&
+ GET 请求没有 BODY。
}
diff --git a/client/containers/Project/Interface/InterfaceList/View.js b/client/containers/Project/Interface/InterfaceList/View.js
index b7901f57..bec943fc 100644
--- a/client/containers/Project/Interface/InterfaceList/View.js
+++ b/client/containers/Project/Interface/InterfaceList/View.js
@@ -30,17 +30,17 @@ class View extends Component {
componentDidMount() {
let that = this;
mockEditor({
- container: 'req_body_json',
+ container: 'vreq_body_json',
data: that.props.req_body_form,
onChange: function () {}
})
mockEditor({
- container: 'res_body_json',
+ container: 'vres_body_json',
data: that.props.res_body,
onChange: function () {}
})
mockEditor({
- container: 'req_query_json',
+ container: 'vreq_query_json',
data: that.props.req_query,
onChange: function () {}
})
@@ -106,15 +106,15 @@ class View extends Component {