From fb6c09f7df290038f689e11bda5b4c6ac615b2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 22 Jun 2019 20:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/coursesDetail/CoursesBanner.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index cf28a498e..9a35a0f81 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -52,9 +52,17 @@ class CoursesBanner extends Component { componentDidMount() { this.onloadupdatabanner() - this.setState({ - user_phone_binded :this.props.current_user.user_phone_binded, - }) + try { + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + }catch (e) { + console.log("CoursesBanner 60") + console.log(e) + } + } onloadupdatabanner=()=>{ this.updatabanner()