|<\/div>/g
editor.customConfig.menus = []
editor.customConfig.onchange = html => {
- console.log(html)
- html = html.match(/{.*}/g)[0]
+ // html = html.match(/{.*}/g)[0]
html = html.replace(reg, '')
- console.log(html)
this.props.getResParams(html)
}
setTimeout(() => {
diff --git a/client/containers/Interface/Interface.js b/client/containers/Interface/Interface.js
index 88852848..0a96066a 100644
--- a/client/containers/Interface/Interface.js
+++ b/client/containers/Interface/Interface.js
@@ -42,10 +42,10 @@ class Interface extends Component {
}
componentWillMount () {
- // 558 665 704 743
+ const interfaceId = this.getInterfaceId()
const params = {
params: {
- project_id: 558
+ project_id: interfaceId
}
}
@@ -63,6 +63,13 @@ class Interface extends Component {
})
}
+ getInterfaceId () {
+ const reg = /Interface\/(\d+)/g
+ const url = location.href
+ url.match(reg)
+ return RegExp.$1
+ }
+
render () {
const { interfaceData, projectMember, modalVisible } = this.props
return (
diff --git a/client/containers/Interface/Interface.scss b/client/containers/Interface/Interface.scss
index 308e672f..07489b8f 100644
--- a/client/containers/Interface/Interface.scss
+++ b/client/containers/Interface/Interface.scss
@@ -32,7 +32,7 @@
.interface-table {
-webkit-box-flex: 1;
- margin: 0 0 0 20px;
+ margin: 0 20px;
.ant-table-wrapper table {
font-size: .14rem;
diff --git a/client/containers/Interface/InterfaceList/InterfaceList.js b/client/containers/Interface/InterfaceList/InterfaceList.js
index e7cfe677..b0720f50 100644
--- a/client/containers/Interface/InterfaceList/InterfaceList.js
+++ b/client/containers/Interface/InterfaceList/InterfaceList.js
@@ -11,16 +11,24 @@ class InterfaceList extends Component {
super(props)
}
+ getInterfaceId () {
+ const reg = /Interface\/(\d+)/g
+ const url = location.href
+ url.match(reg)
+ return RegExp.$1
+ }
+
render () {
const { projectMember } = this.props
-
+ const getInterfaceId = this.getInterfaceId()
+ console.log(`/AddInterface/${getInterfaceId}`)
return (
)
}
}
-export default InterfaceList
\ No newline at end of file
+export default InterfaceList
diff --git a/client/containers/ProjectGroups/ProjectList/ProjectList.js b/client/containers/ProjectGroups/ProjectList/ProjectList.js
index 6c2130c8..ee6138eb 100644
--- a/client/containers/ProjectGroups/ProjectList/ProjectList.js
+++ b/client/containers/ProjectGroups/ProjectList/ProjectList.js
@@ -41,7 +41,7 @@ const getColumns = (data, props) => {
dataIndex: 'name',
key: 'name',
render: (text, record) => {
- return
{text}
+ return
{text}
}
}, {
title: '创建人',