fix: 预览优化

This commit is contained in:
gaoxiaolin.gao 2018-04-20 17:18:37 +08:00
parent e63420b038
commit 0d40ca0ae9
3 changed files with 5 additions and 4 deletions

View File

@ -369,7 +369,7 @@ export default class Run extends Component {
id={+this.state._id}
/> }
<Modal
{this.state.envModalVisible && <Modal
title='环境设置'
visible={this.state.envModalVisible}
onOk={this.handleEnvOk}
@ -381,7 +381,7 @@ export default class Run extends Component {
<ProjectEnv
projectId={this.props.data.project_id}
onOk={this.handleEnvOk} />
</Modal>
</Modal>}
<CheckCrossInstall hasPlugin={hasPlugin} />
<div className="url">

View File

@ -109,6 +109,7 @@ class UsernameAutoComplete extends Component {
style={{ width: '100%' }}
placeholder="请输入用户名"
filterOption={false}
optionLabelProp='children'
notFoundContent={fetching ? <span style={{color:'red'}}> 当前用户不存在</span> : null}
onSearch={this.handleSearch}
onChange={this.handleChange}

View File

@ -143,8 +143,8 @@ class interfaceController extends baseController {
return ctx.body = yapi.commons.resReturn(null, 40033, '没有权限');
}
params.method = params.method || 'GET';
params.res_body_is_json_schema = _.isUndefined (params.res_body_is_json_schema) ? true : params.res_body_is_json_schema;
params.req_body_is_json_schema = _.isUndefined(params.req_body_is_json_schema) ? true : params.req_body_is_json_schema;
params.res_body_is_json_schema = _.isUndefined (params.res_body_is_json_schema) ? false : params.res_body_is_json_schema;
params.req_body_is_json_schema = _.isUndefined(params.req_body_is_json_schema) ? false : params.req_body_is_json_schema;
params.method = params.method.toUpperCase();
params.req_params = params.req_params || [];
params.res_body_type = params.res_body_type ? params.res_body_type.toLowerCase() : 'json';