Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hss
cxt 5 years ago
commit ee0bf46e5a

@ -78,10 +78,10 @@ class BanksIndex extends Component{
}
componentDidMount = () =>{
let pathname = this.props.location.pathname;
this.setState({
publicly:pathname.indexOf("/publicly") > -1
})
// let pathname = this.props.location.pathname;
// this.setState({
// publicly:pathname.indexOf("/publicly") > -1
// })
}
@ -92,16 +92,16 @@ class BanksIndex extends Component{
}
componentDidUpdate(prevProps) {
if(prevProps.current_user!=this.props.current_user){
let { publicly }=this.state;
if( this.props.checkIfLogin()) {
if (this.props.current_user && this.props.current_user.professional_certification == false && publicly){
this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
}
} else {
this.props.showLoginDialog()
}
}
// if(prevProps.current_user!=this.props.current_user){
// let { publicly }=this.state;
// if( this.props.checkIfLogin()) {
// if (this.props.current_user && this.props.current_user.professional_certification == false && publicly){
// this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
// }
// } else {
// this.props.showLoginDialog()
// }
// }
// let { publicly }=this.state;
// if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){
// if( this.props.checkIfLogin()) {

Loading…
Cancel
Save