diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d98228856..d2b942ce7 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -79,10 +79,10 @@ class Trialapplication extends Component { }); console.log("89"); try { - if (this.state.props.user !== undefined) { - console.log(this.state.props.user && this.state.props.user.user_phone_binded); + if (this.state.props.user_phone_binded !== undefined) { + console.log(this.state.props.user_phone_binded); this.setState({ - user_phone_binded: this.state.props.user.user_phone_binded, + user_phone_binded: this.state.props.user_phone_binded, }) } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 3d3e83d36..955ae593f 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -171,7 +171,6 @@ class NewHeader extends Component { isRender:false, isRenders:false, showTrial:false, - user:undefined, } console.log("176") console.log(props); @@ -583,7 +582,6 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - {/*{*/} {/* isRenders&&isRenders===true?*/} diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index c808a4808..7723af4fc 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -9,6 +9,7 @@ import { getUrl } from 'educoder' import axios from 'axios'; import './TPMIndex.css' +import Trialapplication from "../login/Trialapplication"; // import "antd/dist/antd.css"; // import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-all.css' @@ -246,10 +247,10 @@ export function TPMIndexHOC(WrappedComponent) { } */ if (response.data) { - this.initCommonState(response.data) - this.setState({ - tpmLoading: false, + this.setState({ + user_phone_binded:response.data.user_phone_binded, + tpmLoading: false, coursedata: { course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined, course_public: response.data.course_public, @@ -266,7 +267,7 @@ export function TPMIndexHOC(WrappedComponent) { }) } render() { - let{Headertop,Footerdown}=this.state; + let{Headertop,Footerdown,user_phone_binded}=this.state; const common = { isSuperAdmin:this.isSuperAdmin, isAdminOrCreator:this.isAdminOrCreator, @@ -278,11 +279,17 @@ export function TPMIndexHOC(WrappedComponent) { isNotMember: this.isNotMember, isUserid:this.state.coursedata&&this.state.coursedata.userid } - - return (
- + + } + +