完善资料

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' : debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 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; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

@ -8,7 +8,15 @@ class LinkAfterLogin extends Component {
} }
checkAuth = () => { checkAuth = () => {
if (this.props.checkIfLogin()) { 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 { } else {
this.props.showLoginDialog() this.props.showLoginDialog()
} }

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

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

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

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

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

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

Loading…
Cancel
Save