mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-03 04:50:32 +08:00
fix: 预览
This commit is contained in:
parent
559d281da6
commit
5c2e34647f
@ -329,20 +329,23 @@ class View extends Component {
|
||||
done: '已完成'
|
||||
};
|
||||
|
||||
let bodyShow =
|
||||
this.props.curData.req_body_other ||
|
||||
(this.props.curData.req_body_type === 'form' &&
|
||||
this.props.curData.req_body_form &&
|
||||
this.props.curData.req_body_form.length);
|
||||
|
||||
let requestShow =
|
||||
(dataSource && dataSource.length) ||
|
||||
(req_dataSource && req_dataSource.length) ||
|
||||
(this.props.curData.req_query && this.props.curData.req_query.length) ||
|
||||
this.props.curData.req_body_other ||
|
||||
(this.props.curData.req_body_form && this.props.curData.req_body_form.length);
|
||||
(this.props.curData.req_query && this.props.curData.req_query.length) || bodyShow
|
||||
|
||||
let methodColor =
|
||||
variable.METHOD_COLOR[
|
||||
this.props.curData.method ? this.props.curData.method.toLowerCase() : 'get'
|
||||
];
|
||||
|
||||
let bodyShow =
|
||||
this.props.curData.req_body_other ||
|
||||
(this.props.curData.req_body_form && this.props.curData.req_body_form.length);
|
||||
|
||||
|
||||
// statusColor = statusColor[this.props.curData.status?this.props.curData.status.toLowerCase():"undone"];
|
||||
// const aceEditor = <div style={{ display: this.props.curData.req_body_other && (this.props.curData.req_body_type !== "form") ? "block" : "none" }} className="colBody">
|
||||
@ -350,8 +353,6 @@ class View extends Component {
|
||||
// </div>
|
||||
if (!methodColor) methodColor = 'get';
|
||||
|
||||
|
||||
|
||||
let res = (
|
||||
<div className="caseContainer">
|
||||
<h2 className="interface-title" style={{ marginTop: 0 }}>
|
||||
@ -533,8 +534,6 @@ class View extends Component {
|
||||
this.props.curData.res_body,
|
||||
this.props.curData.res_body_is_json_schema
|
||||
)}
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
|
@ -54,7 +54,9 @@ class interfaceColController extends baseController{
|
||||
*/
|
||||
async testSingleUpload(ctx){
|
||||
try{
|
||||
|
||||
let params = ctx.request.body;
|
||||
|
||||
ctx.body = yapi.commons.resReturn({res: '上传成功'});
|
||||
|
||||
}catch(e){
|
||||
|
Loading…
Reference in New Issue
Block a user