|
|
|
@ -10,6 +10,8 @@ import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
import './TPMIndex.css'
|
|
|
|
|
import LoginDialog from '../login/LoginDialog';
|
|
|
|
|
import AccountProfile from '../user/AccountProfile';
|
|
|
|
|
|
|
|
|
|
import Trialapplication from "../login/Trialapplication";
|
|
|
|
|
// import "antd/dist/antd.css";
|
|
|
|
|
// import '../../css/educoder/edu-common.css'
|
|
|
|
@ -76,7 +78,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
Footerdown:undefined,
|
|
|
|
|
coursedata: {},
|
|
|
|
|
|
|
|
|
|
isRender: false
|
|
|
|
|
isRender: false,
|
|
|
|
|
AccountProfiletype: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -300,11 +303,26 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
isRender: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkIfLogin = () => {
|
|
|
|
|
return this.state.current_user && this.state.current_user.login != ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hideAccountProfile = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
hideAccountProfile: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
showProfileCompleteDialog = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
hideAccountProfile: true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
checkIfProfileCompleted = () => {
|
|
|
|
|
return this.state.current_user && this.state.current_user.profile_completed
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let{Headertop,Footerdown, isRender}=this.state;
|
|
|
|
|
let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state;
|
|
|
|
|
const common = {
|
|
|
|
|
isSuperAdmin:this.isSuperAdmin,
|
|
|
|
|
isAdminOrCreator:this.isAdminOrCreator,
|
|
|
|
@ -319,6 +337,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
|
|
|
|
|
showLoginDialog: this.showLoginDialog,
|
|
|
|
|
checkIfLogin: this.checkIfLogin,
|
|
|
|
|
showProfileCompleteDialog: this.showProfileCompleteDialog,
|
|
|
|
|
checkIfProfileCompleted: this.checkIfProfileCompleted,
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
@ -327,6 +347,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...this.props}
|
|
|
|
|
/> : ""}
|
|
|
|
|
{AccountProfiletype===true ? <AccountProfile
|
|
|
|
|
hideAccountProfile={()=>this.hideAccountProfile()}
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...this.props}
|
|
|
|
|
/>:""}
|
|
|
|
|
<SiderBar Headertop={Headertop}/>
|
|
|
|
|
{/* 注释掉了1440 影响到了手机屏幕的展示 */}
|
|
|
|
|
<style>{
|
|
|
|
|