diff --git a/client/containers/AddInterface/AddInterface.js b/client/containers/AddInterface/AddInterface.js index 42aabcc2..74e2229b 100644 --- a/client/containers/AddInterface/AddInterface.js +++ b/client/containers/AddInterface/AddInterface.js @@ -239,7 +239,7 @@ class AddInterface extends Component { render () { const TabPane = Tabs.TabPane const { isLoading, isSave, mockJson='', mockURL } = this.state - console.log(mockURL) + return (
diff --git a/client/containers/AddInterface/InterfaceTest/InterfaceTest.js b/client/containers/AddInterface/InterfaceTest/InterfaceTest.js index 51f2f830..ae5f1161 100644 --- a/client/containers/AddInterface/InterfaceTest/InterfaceTest.js +++ b/client/containers/AddInterface/InterfaceTest/InterfaceTest.js @@ -86,8 +86,8 @@ export default class InterfaceTest extends Component { a:1 }, success: (res, header) => { - this.setState({res}) console.log(header) + this.setState({res}) } }) } diff --git a/client/containers/AddInterface/ReqHeader/ReqHeader.js b/client/containers/AddInterface/ReqHeader/ReqHeader.js index bb69af71..d3e39576 100644 --- a/client/containers/AddInterface/ReqHeader/ReqHeader.js +++ b/client/containers/AddInterface/ReqHeader/ReqHeader.js @@ -11,7 +11,6 @@ import { // 重新渲染页面 const getReqList = function (self) { const [reqList, seqGroup] = [[], self.props.seqGroup] - console.log('seqGroup', seqGroup) seqGroup.map((value, key) => { reqList.push() }) diff --git a/client/containers/AddInterface/ReqMethod/ReqMethod.js b/client/containers/AddInterface/ReqMethod/ReqMethod.js index 0b5dae20..286120a8 100644 --- a/client/containers/AddInterface/ReqMethod/ReqMethod.js +++ b/client/containers/AddInterface/ReqMethod/ReqMethod.js @@ -40,7 +40,6 @@ class ReqMethod extends Component { @autobind handleChange (value) { - console.log('value', value) this.props.pushInterfaceMethod(value) } diff --git a/client/containers/Interface/InterfaceTable/InterfaceTable.js b/client/containers/Interface/InterfaceTable/InterfaceTable.js index 1d43a5da..4e3d26ac 100644 --- a/client/containers/Interface/InterfaceTable/InterfaceTable.js +++ b/client/containers/Interface/InterfaceTable/InterfaceTable.js @@ -1,7 +1,8 @@ import React, { Component } from 'react' -import { Table } from 'antd' +import { Table, Popconfirm, message } from 'antd' import PropTypes from 'prop-types' import axios from 'axios' +import { autobind } from 'core-decorators' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { deleteInterfaceData } from '../../../actions/interfaceAction.js' @@ -29,6 +30,12 @@ class InterfaceTable extends Component { super(props) } + @autobind + confirm (interfaceId) { + this.deleteInterface(interfaceId) + message.success('删除成功!'); + } + deleteInterfaceData (interfaceId) { let interfaceArr = [] let { interfaceData } = this.props @@ -70,15 +77,17 @@ class InterfaceTable extends Component { title: '功能', 'key': 'action', render: (data) => { - const deleteInterface = this.deleteInterface.bind(this, data._id) - console.log(data) + // const deleteInterface = this.deleteInterface.bind(this, data._id) + const confirm = this.confirm.bind(this, data._id) return ( 编辑 测试 - 删除 + + 删除 + ) }