From 4dff0a03cec2c0b6b35437ad883c3c80b1bb0f15 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 11:22:40 +0800 Subject: [PATCH] route --- public/react/src/modules/courses/Index.js | 9 +++++++-- public/react/src/modules/courses/busyWork/commonWork.js | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 553db6090..c385af3b7 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -452,6 +452,11 @@ class CoursesIndex extends Component{ (props) => () } > + () + } + > {/*课堂讨论*/} {/* 普通作业 */} - () } > {/* 分组作业 */} - () } diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 5ba97b03a..9f3d8dda0 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -71,6 +71,13 @@ class commonWork extends Component{ sureDelClasses(){ } + componentDidUpdate(prevProps, prevState) { + debugger; + if (prevProps.match.path != this.props.match.path) { + this.componentDidMount() + } + } + componentDidMount(){ this.setState({