Merge branch 'dev_aliyun_beta' into topic_bank

topic_bank
caicai8 6 years ago
commit 82fe9f6ca6

@ -72,16 +72,32 @@ class BanksIndex extends Component{
constructor(props){
super(props);
this.state={
crumbData:undefined
crumbData:undefined,
publicly:undefined
}
}
componentDidMount = () =>{
let pathname = this.props.location.pathname;
this.setState({
publicly:pathname.indexOf("/publicly") > -1
})
}
initPublic = (crumbData) =>{
this.setState({
crumbData
})
}
componentDidUpdate=()=>{
let { publicly }=this.state
if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){
this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
}
}
render(){
let { crumbData }=this.state
const common = {

Loading…
Cancel
Save