diff --git a/client/containers/Project/Interface/InterfaceList/View.js b/client/containers/Project/Interface/InterfaceList/View.js index ea8ec357..af83a31e 100644 --- a/client/containers/Project/Interface/InterfaceList/View.js +++ b/client/containers/Project/Interface/InterfaceList/View.js @@ -1,14 +1,23 @@ -<<<<<<< HEAD -import '../interface.scss' +import './View.scss' import React, { Component } from 'react' import { connect } from 'react-redux' import PropTypes from 'prop-types' -import { formatTime } from '../../../../common.js'; +import { Table } from 'antd' +const mockEditor = require('./mockEditor.js') +// import { formatTime } from '../../../../common.js'; // import { Card } from 'antd' // import { getMockUrl } from '../../reducer/modules/news.js' -@connect() +@connect(state=>{ + console.log(state); + return { + curData: state.inter.curdata + } +}) + + + class View extends Component { constructor(props) { @@ -18,98 +27,162 @@ class View extends Component { viewData: PropTypes.object } + + componentDidMount() { + let that = this; + mockEditor({ + container: 'req_body_json', + data: that.props.req_body_form, + onChange: function () {} + }) + mockEditor({ + container: 'res_body_json', + data: that.props.res_body, + onChange: function () {} + }) + mockEditor({ + container: 'req_query_json', + data: that.props.req_query, + onChange: function () {} + }) + } + render () { + + const dataSource = [{ + name: '1', + value: '胡彦斌', + desc: 32 + }, { + name: '2', + value: '胡彦斌', + desc: 32 + }]; + + const columns = [{ + title: '参数名称', + dataIndex: 'name', + key: 'name' + }, { + title: '参数值', + dataIndex: 'value', + key: 'value' + }, { + title: '备注', + dataIndex: 'desc', + key: 'desc', + width: '45%' + }]; + + + + return
- {view} -- } -} - -export default InterfaceView; ->>>>>>> fe76f992f0b0251fce75b3fb564ace43565ab8b4 diff --git a/client/containers/Project/Interface/InterfaceList/View.scss b/client/containers/Project/Interface/InterfaceList/View.scss new file mode 100644 index 00000000..c8657682 --- /dev/null +++ b/client/containers/Project/Interface/InterfaceList/View.scss @@ -0,0 +1,35 @@ +.caseContainer{ + padding: 24px; + font-size: 12px; + // display: flex; + overflow: hidden; + >div{ + margin: 8px 0px; + // background-color: #ececec; + padding: 16px; + width: 100%; + box-sizing: border-box; + float: left; + .colKey{ + font-weight: bolder; + margin-right: 16px; + } + } + .colName,.colPath,.colstatus,.colMock{ + width: 50%; + float: left; + padding: 8px 16px; + } + .colDesc{ + line-height: 1.5em; + .colKey{ + margin-right: 0px; + float: left; + margin-bottom: 8px; + } + .colValue{ + float: left; + text-indent: 2em; + } + } +} \ No newline at end of file diff --git a/client/containers/Project/Interface/interface.scss b/client/containers/Project/Interface/interface.scss index da438153..0b1b3898 100644 --- a/client/containers/Project/Interface/interface.scss +++ b/client/containers/Project/Interface/interface.scss @@ -65,19 +65,7 @@ } } } -.caseContainer{ - padding: 24px; - font-size: 12px; - >div{ - margin: 8px 0px; - padding: 12px; - background-color: #ececec; - .colKey{ - font-weight: bolder; - margin-right: 16px; - } - } -} + diff --git a/client/containers/User/Profile.js b/client/containers/User/Profile.js index 1c3c1189..5c59c9cd 100644 --- a/client/containers/User/Profile.js +++ b/client/containers/User/Profile.js @@ -152,7 +152,7 @@ class Profile extends Component { userNameEditHtml =