diff --git a/CHANGELOG.md b/CHANGELOG.md
index af61488f..6e484424 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
* 增加项目文档记录wiki
* 支持swagger URL 导入
+* 接口运行和测试集合中加入参数备注信息
#### Bug Fixed
diff --git a/client/components/Postman/Postman.js b/client/components/Postman/Postman.js
index 1d9623fb..53600b21 100755
--- a/client/components/Postman/Postman.js
+++ b/client/components/Postman/Postman.js
@@ -66,6 +66,23 @@ const InsertCodeMap = [
}
];
+const TooltipContent = props => {
+ const { example, desc } = props;
+ const isNull = !example && !desc;
+
+ return (
+
+ {example &&
示例: {example}
}
+ {desc &&
备注: {desc}
}
+ {isNull &&
没有备注和示例信息
}
+
+ );
+};
+TooltipContent.propTypes = {
+ example: PropTypes.string,
+ desc: PropTypes.string
+};
+
export default class Run extends Component {
static propTypes = {
data: PropTypes.object, //接口原有数据
@@ -160,7 +177,7 @@ export default class Run extends Component {
required: true
});
body = JSON.stringify(result.data);
- console.log('body', body);
+
}
this.setState(
@@ -258,7 +275,7 @@ export default class Run extends Component {
try {
result = await crossRequest(options, this.state.pre_script, this.state.after_script);
result = {
- header: result.res.header,
+ header: result.res.header,
body: result.res.body,
status: result.res.status,
statusText: result.res.statusText,
@@ -558,7 +575,12 @@ export default class Run extends Component {
{req_params.map((item, index) => {
return (