From 5c2e34647f178bc4c4fa05da2ed529443c85b953 Mon Sep 17 00:00:00 2001 From: "gaoxiaolin.gao" Date: Thu, 26 Apr 2018 20:12:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project/Interface/InterfaceList/View.js | 19 +++++++++---------- server/controllers/test.js | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/client/containers/Project/Interface/InterfaceList/View.js b/client/containers/Project/Interface/InterfaceList/View.js index 75c8e56e..62aac3be 100755 --- a/client/containers/Project/Interface/InterfaceList/View.js +++ b/client/containers/Project/Interface/InterfaceList/View.js @@ -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 =
@@ -350,8 +353,6 @@ class View extends Component { //
if (!methodColor) methodColor = 'get'; - - let res = (

@@ -533,8 +534,6 @@ class View extends Component { this.props.curData.res_body, this.props.curData.res_body_is_json_schema )} - -

); diff --git a/server/controllers/test.js b/server/controllers/test.js index 49f4eae6..1b7a49b0 100644 --- a/server/controllers/test.js +++ b/server/controllers/test.js @@ -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){