杨树明 5 years ago
parent 578f2ab200
commit a70fc2c8c9

@ -66,13 +66,7 @@ class PackageIndexNEIBannerConcent extends Component {
categories:[] categories:[]
} }
} }
// componentDidUpdate = (prevProps) => {
// if(this.props.current_user&&this.props.current_user.username!=prevProps.current_user&&prevProps.current_user.username){
// this.setState({
// contact_name:this.props.current_user&&this.props.current_user.username
// })
// }
// }
componentDidMount() { componentDidMount() {
window.document.title = '众包创新' window.document.title = '众包创新'
@ -99,6 +93,7 @@ class PackageIndexNEIBannerConcent extends Component {
}) })
}else{ }else{
console.log(this.props.current_user&&this.props.current_user.username)
this.setState({ this.setState({
contact_name:this.props.current_user&&this.props.current_user.username contact_name:this.props.current_user&&this.props.current_user.username
}) })
@ -121,6 +116,14 @@ class PackageIndexNEIBannerConcent extends Component {
// this.contentMdRef.current.setValue("测试赋值") // this.contentMdRef.current.setValue("测试赋值")
} }
// componentDidUpdate = (prevProps) => {
// if(this.props.current_user&&this.props.current_user.username!=prevProps.current_user&&prevProps.current_user.username){
// this.setState({
// contact_name:this.props.current_user&&this.props.current_user.username
// })
// }
// }
//获取验证码; //获取验证码;
getverificationcode =()=>{ getverificationcode =()=>{
// if (this.state.logins&&this.state.logins.length === 0) { // if (this.state.logins&&this.state.logins.length === 0) {

@ -110,23 +110,14 @@ class InfosCourse extends Component{
<div className="white-panel edu-back-white pt25 pb25 clearfix "> <div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li> <li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li> <li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}参与</a></li>
</div> </div>
<p className="pl25 pr25 clearfix font-12 mb20 mt20"> <p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">{totalCount}</span> <span className="fl color-grey-9">{0}</span>
<span className="fr color-grey-9">发布时间</span> <span className="fr color-grey-9">发布时间</span>
</p> </p>
<div className="square-list clearfix">
{
page == 1 && is_current &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
}
{
(!data || data.courses.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData>
}
</div>
</Spin> </Spin>
</div> </div>
) )

Loading…
Cancel
Save