dev_forum
ysl 6 years ago
parent 0283a47420
commit bda8393f27

@ -79,10 +79,10 @@ class Trialapplication extends Component {
}); });
console.log("89"); console.log("89");
try { try {
if (this.state.props.user !== undefined) { if (this.state.props.user_phone_binded !== undefined) {
console.log(this.state.props.user && this.state.props.user.user_phone_binded); console.log(this.state.props.user_phone_binded);
this.setState({ this.setState({
user_phone_binded: this.state.props.user.user_phone_binded, user_phone_binded: this.state.props.user_phone_binded,
}) })
} }

@ -171,7 +171,6 @@ class NewHeader extends Component {
isRender:false, isRender:false,
isRenders:false, isRenders:false,
showTrial:false, showTrial:false,
user:undefined,
} }
console.log("176") console.log("176")
console.log(props); console.log(props);
@ -583,7 +582,6 @@ submittojoinclass=(value)=>{
/> />
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
<Trialapplication {...this.state}></Trialapplication>
{/*{*/} {/*{*/}
{/* isRenders&&isRenders===true?*/} {/* isRenders&&isRenders===true?*/}

@ -9,6 +9,7 @@ import { getUrl } from 'educoder'
import axios from 'axios'; import axios from 'axios';
import './TPMIndex.css' import './TPMIndex.css'
import Trialapplication from "../login/Trialapplication";
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
// import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-common.css'
// import '../../css/educoder/edu-all.css' // import '../../css/educoder/edu-all.css'
@ -246,9 +247,9 @@ export function TPMIndexHOC(WrappedComponent) {
} }
*/ */
if (response.data) { if (response.data) {
this.initCommonState(response.data) this.initCommonState(response.data)
this.setState({ this.setState({
user_phone_binded:response.data.user_phone_binded,
tpmLoading: false, tpmLoading: false,
coursedata: { coursedata: {
course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined, course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined,
@ -266,7 +267,7 @@ export function TPMIndexHOC(WrappedComponent) {
}) })
} }
render() { render() {
let{Headertop,Footerdown}=this.state; let{Headertop,Footerdown,user_phone_binded}=this.state;
const common = { const common = {
isSuperAdmin:this.isSuperAdmin, isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator, isAdminOrCreator:this.isAdminOrCreator,
@ -278,11 +279,17 @@ export function TPMIndexHOC(WrappedComponent) {
isNotMember: this.isNotMember, isNotMember: this.isNotMember,
isUserid:this.state.coursedata&&this.state.coursedata.userid isUserid:this.state.coursedata&&this.state.coursedata.userid
} }
return ( return (
<div> <div>
<SiderBar {
user_phone_binded === undefined?
""
:
<Trialapplication {...this.state} user_phone_binded={user_phone_binded}></Trialapplication>
}
<SiderBar
Headertop={Headertop} Headertop={Headertop}
/> />
<NewHeader {...this.state} {...this.props}></NewHeader> <NewHeader {...this.state} {...this.props}></NewHeader>

Loading…
Cancel
Save