From bc30821a5b13104d6cbb4beedc1188d11ff729eb Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 23 Jul 2019 18:32:54 +0800 Subject: [PATCH] rename --- .../modules/courses/busyWork/commonWork.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index d1f6a8e0b..f9c34cfcf 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -11,7 +11,7 @@ import CommonWorkItem from './CommonWorkItem' import PublishRightnow from './PublishRightnow' import ConnectProject from './ConnectProject' -import { WordsBtn } from 'educoder' +import { WordsBtn, on, off } from 'educoder' import Modals from '../../modals/Modals' import NoneData from "../coursesPublic/NoneData" import Titlesearchsection from '../common/titleSearch/TitleSearchSection'; @@ -76,18 +76,29 @@ class commonWork extends Component{ } componentDidUpdate(prevProps, prevState) { if (prevProps.match.path != this.props.match.path) { - this.componentDidMount() + this._getList() } } - - componentDidMount(){ + _getList = () => { this.setState({ isSpin:true }) let {page,search,order}=this.state; this.getList(page,search,order); } + componentDidMount(){ + this._getList() + + on('updateNavSuccess', this.updateNavSuccess) + } + componentWillUnmount() { + off('updateNavSuccess', this.updateNavSuccess) + } + updateNavSuccess = () => { + this._getList() + } + useBankSuccess = (checkBoxValues, newWorkIdArray) => { this.setState({ page:1,