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 (
{ 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/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 (
{/*sync | poweroff */}
- {/**/}
+