From cc8e049d90605de40d14e5d832f0ae4808178176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 26 Jul 2019 17:37:47 +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/tpm/NewHeader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 5a414b66..99021dc2 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -262,7 +262,7 @@ class NewHeader extends Component { if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){ window.location.href = "/login"; return - }else if(this.state.current_user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){ + }else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){ window.location.href = "/login"; return } @@ -312,7 +312,7 @@ class NewHeader extends Component { - console.log(this.props.current_user&&this.props.current_user.login=== "") + console.log(this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true) console.log(this.state.current_user) // console.log(match.path.startsWith("/ec_courses")) return ( @@ -481,7 +481,10 @@ class NewHeader extends Component {