From 118af129571f726e8b96f3b7eceecd65ec8cdf6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Dec 2019 09:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesHome/CoursesHome.js | 18 +++++++++- .../courses/exercise/Exercisesetting.js | 4 ++- .../courses/poll/PollDetailTabForth.js | 4 +-- .../modules/paths/PathDetail/Addshixuns.js | 16 ++++----- .../src/modules/paths/ShixunPathSearch.js | 35 ++++++++++++++++++- public/react/src/modules/tpm/TPMBanner.js | 2 +- public/react/src/modules/tpm/jupyter/index.js | 12 +++---- 7 files changed, 71 insertions(+), 20 deletions(-) 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 */}
- {/**/}
+