From 6f4566e03bd11359b1534f5ff82e05f7359521fc 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 23:08:50 +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 --- .../courses/coursesDetail/CoursesBanner.js | 11 +++++- public/react/src/modules/tpm/NewHeader.js | 35 ++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 9a35a0f81..4e3f6a42d 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -344,7 +344,16 @@ class CoursesBanner extends Component { render() { let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; - + try { + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + }catch (e) { + console.log("CoursesBanner 354") + console.log(e) + } return (
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index bdb6b2a09..17061f530 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -330,6 +330,24 @@ class NewHeader extends Component { }) } educoderlogin=()=>{ + //退出账号 + this.setState({ + isRender:true + }) + // var url = `/accounts/logout.json`; + // + // axios.get((url)).then((result) => { + // if(result!==undefined){ + // // this.setState({ + // // isRender:true + // // }) + // window.location.href = "/"; + // } + // }).catch((error) => { + // console.log(error); + // }) + } + educoderloginysl=()=>{ //退出账号 // this.setState({ // isRender:true @@ -337,17 +355,16 @@ class NewHeader extends Component { var url = `/accounts/logout.json`; axios.get((url)).then((result) => { - if(result!==undefined){ - // this.setState({ - // isRender:true - // }) - window.location.href = "/"; - } + if(result!==undefined){ + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; + } }).catch((error) => { - console.log(error); + console.log(error); }) } - onKeywordSearch = () => { header_search(this) } @@ -729,7 +746,7 @@ submittojoinclass=(value)=>{
  • {/*退出*/} {/*this.educoderlogin()}>退出*/} - this.educoderlogin()}>退出 + this.educoderloginysl()}>退出