diff --git a/public/react/src/modules/courses/coursesHome/CoursesHome.js b/public/react/src/modules/courses/coursesHome/CoursesHome.js index c02c49ee9..f6b6d7303 100644 --- a/public/react/src/modules/courses/coursesHome/CoursesHome.js +++ b/public/react/src/modules/courses/coursesHome/CoursesHome.js @@ -102,11 +102,26 @@ class CoursesHome extends Component{ }) } + getUser=(url,type)=>{ + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + if(url !== undefined || url!==""){ + this.props.history.push(url); + } + + } render() { let { order,search,page,coursesHomelist }=this.state; - + //console.log(this.props) return (
{this.state.updata===undefined?"": this.changeStatus("created_at")}>最新 this.changeStatus("visits")}>最热 + {this.props.user&&this.props.user.user_identity==="学生"?"":this.getUser("/courses/new")}>+新建翻转课堂} {/*
*/} {/*/!* 截止时间:
+ +

{ unit_e_tip && unit_e_tip != "" ? { unit_e_tip }:"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js index aa9038d9b..17284a8fc 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForth.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js @@ -584,7 +584,7 @@ class PollDetailTabForth extends Component{

截止时间:
- + diff --git a/public/react/src/modules/paths/PathDetail/Addshixuns.js b/public/react/src/modules/paths/PathDetail/Addshixuns.js index a4819ed76..9e7766e32 100644 --- a/public/react/src/modules/paths/PathDetail/Addshixuns.js +++ b/public/react/src/modules/paths/PathDetail/Addshixuns.js @@ -93,14 +93,14 @@ class Addshixuns extends Component { :""}
- {/*
*/} - {/* */} - {/* */} - {/* 普通实训*/} - {/* jupyter实训*/} - {/* */} - {/* */} - {/*
*/} +
+ + + 普通实训 + jupyter实训 + + +

实训名称: diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js index a473c5149..adadc306b 100644 --- a/public/react/src/modules/paths/ShixunPathSearch.js +++ b/public/react/src/modules/paths/ShixunPathSearch.js @@ -124,10 +124,39 @@ class ShixunPathSearch extends Component{ this.props.history.push(url) } + //头部获取是否已经登录了 + getUser=(url,type)=>{ + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + if(url !== undefined || url!==""){ + this.props.history.push(url); + } + + + } render() { let { order,sortList,search,page,total_count,select }=this.state; + let pathstype=false; + if(this.props&&this.props.mygetHelmetapi!=null){ + let paths="/paths"; + this.props.mygetHelmetapi.navbar.map((item,key)=>{ + var reg = RegExp(item.link); + if(paths.match(reg)){ + if(item.hidden===true){ + pathstype=true + } + } - // console.log() + }) + } + // console.log(this.props) return (

{this.state.updata===undefined?"": this.changeStatus("mine")}>我的*/} this.changeStatus("updated_at")}>最新 this.changeStatus("myshixun_count")}>最热 + {this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":this.getUser("/paths/new")}>+新建实践课程} + {this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"": + pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?this.getUser("/paths/new")}>+新建实践课程:"" + } {/*
*/} {/*/!*

{/*sync | poweroff */} - {/*重置实训*/} +