From 199f1b929442c70674e1e207c6247e73cc03bed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 6 Sep 2019 10:21:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/new/CoursesNew.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 56e03280e..d549bbe1c 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -328,8 +328,7 @@ class CoursesNew extends Component { } goback = (id) => { - - // if(this.props.match.params.coursesId===undefined){ + // if(this.props.match.params.coursesId===undefined){ // this.props.history.push("/courses"); // }else{ // this.props.history.push(this.props.current_user.first_category_url); @@ -340,13 +339,13 @@ class CoursesNew extends Component { // }else{ try { if(this.props.current_user.first_category_url===undefined){ - this.props.history.push(this.props.current_user.first_category_url); + this.props.history.push('/') }else { - this.props.history.goBack() + this.props.history.push(this.props.current_user.first_category_url); } }catch (e) { - this.props.history.goBack() + this.props.history.push('/') } // }