完善资料

dev_cs_new
caishi 6 years ago
parent 3b97dd75ad
commit e62ffdc463

@ -29,7 +29,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || ''
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {

@ -8,7 +8,15 @@ class LinkAfterLogin extends Component {
}
checkAuth = () => {
if (this.props.checkIfLogin()) {
this.props.history.push(this.props.to)
if(this.props.checkProfileComplete){
if(this.props.checkIfProfileCompleted()){
this.props.history.push(this.props.to)
}else{
this.props.showProfileCompleteDialog();
}
}else{
this.props.history.push(this.props.to)
}
} else {
this.props.showLoginDialog()
}

@ -353,8 +353,8 @@ class CoursesBanner extends Component {
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}

@ -94,6 +94,7 @@ class CaseList extends Component{
render(){
let { type , search ,libraries , totalCount ,pageSize ,page } = this.state;
let { checkIfLogin } = this.props;
return(
<React.Fragment>
<img src={mainImg} width="100%" />
@ -101,7 +102,9 @@ class CaseList extends Component{
<div className="edu-back-white mb30 mt30">
<p className="padding20-30 clearfix bor-bottom-greyE">
<span className="font-18 fl color-grey-3">教学案例</span>
<LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn">发布案例</LinkAfterLogin>
<LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn" checkProfileComplete = {true}
>发布案例</LinkAfterLogin>
{/* <ActionBtn style="colorBlue" className="fr" to="/moop_cases/new">发布案例</ActionBtn> */}
</p>
<div className="clearfix pl30 pr30">

@ -330,8 +330,8 @@ class DetailCards extends Component{
<div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
<Modals

@ -571,8 +571,8 @@ class TPMBanner extends Component {
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}

@ -310,12 +310,12 @@ export function TPMIndexHOC(WrappedComponent) {
hideAccountProfile = () => {
this.setState({
hideAccountProfile: false
AccountProfiletype: false
})
}
showProfileCompleteDialog = () => {
this.setState({
hideAccountProfile: true
AccountProfiletype: true
})
}
checkIfProfileCompleted = () => {
@ -344,13 +344,13 @@ export function TPMIndexHOC(WrappedComponent) {
<div>
{isRender===true ? <LoginDialog
Modifyloginvalue={()=>this.hideLoginDialog()}
{...this.state}
{...this.props}
{...this.state}
/> : ""}
{AccountProfiletype===true ? <AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
<SiderBar Headertop={Headertop}/>
{/* 注释掉了1440 影响到了手机屏幕的展示 */}

@ -299,8 +299,8 @@ class Challenges extends Component {
<React.Fragment>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
{loadingContent ?

Loading…
Cancel
Save