diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index ce8cff558..d114b6777 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -414,7 +414,7 @@ class commonWork extends Component{ 补交中 匿评中 申诉中 - 评阅中 + 已截止 } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 783972f75..7f0a89f18 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -736,18 +736,37 @@ submittojoinclass=(value)=>{ }); }; + + + matchpaths=(url)=>{ + const {match} = this.props; + if (url=== '/forums'&&match.path === '/forums') { + return true + } else if (url.startsWith('/shixuns')&&match.path.startsWith('/shixuns')) { + return true + }else if (url.startsWith('/paths')&&match.path.startsWith('/paths')) { + return true + } else if (url.startsWith('/courses')&&match.path.startsWith('/courses')) { + return true + }else if (url.startsWith('/competitions')&&match.path.startsWith('/crowdsourcing')) { + return true + }else if (url.startsWith('/crowdsourcing')&&match.path.startsWith('/crowdsourcing')) { + return true + }else if(url.startsWith('/moop_cases')&&match.path.startsWith('/moop_cases')){ + return true + }else if(url.startsWith('/developer')&&match.path.startsWith('/developer')){ + return true + }else { + return false + } + } render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 - const {match,} = this.props; + const {match} = this.props; let {Addcoursestypes, tojoinitemtype, tojoinclasstitle, - Checkboxteacherchecked, - Checkboxstudentchecked, - Checkboxteachingchecked, - Checkboxteachertype, - Checkboxteachingtype, code_notice, checked_notice, AccountProfiletype, @@ -792,91 +811,30 @@ submittojoinclass=(value)=>{ // console.log("mygetHelmetapi2"); // console.log(mygetHelmetapi2); - if(mygetHelmetapi2){ - if(mygetHelmetapi2.navbar){ - if(mygetHelmetapi2.navbar.length>0){ - // console.log("mygetHelmetapi2.navbar.length>0====-=-=--=-=-=-="); - // - // console.log(match.path); - if(match.path==='/'){ - if(headtypesonClickbool===false){ - headtypes=undefined; - }else{ - headtypes=headtypess; - } - - }else { - for(var i=0;i 0) { + // console.log("mygetHelmetapi2.navbar.length>0====-=-=--=-=-=-="); + // + // console.log(match.path); + if (match.path === '/') { + if (headtypesonClickbool === false) { + headtypes = undefined; + } else { + headtypes = headtypess; + } + } else { + for (var i = 0; i < mygetHelmetapi2.navbar.length; i++) { + if (match.path === mygetHelmetapi2.navbar[i].link) { + headtypes = mygetHelmetapi2.navbar[i].link; + break; + } + } + } - }else{ - if (match.path === '/forums') { - headtypes = '/forums'; - } else if (match.path.startsWith('/shixuns')) { - headtypes = '/shixuns'; - }else if (match.path.startsWith('/paths')) { - headtypes = '/paths'; - } else if (match.path.startsWith('/courses')) { - headtypes = '/courses'; - }else if (match.path.startsWith('/competitions')) { - headtypes = '/competitions'; - }else if (match.path.startsWith('/crowdsourcing')) { - headtypes = '/crowdsourcing'; - }else if(match.path.startsWith('/moop_cases')){ - headtypes = '/moop_cases'; - }else if(match.path.startsWith('/developer')){ - headtypes = '/developer' - }else { - headtypes = '/'; - } - } - }else{ - if (match.path === '/forums') { - headtypes = '/forums'; - } else if (match.path.startsWith('/shixuns')) { - headtypes = '/shixuns'; - }else if (match.path.startsWith('/paths')) { - headtypes = '/paths'; - } else if (match.path.startsWith('/courses')) { - headtypes = '/courses'; - }else if (match.path.startsWith('/competitions')) { - headtypes = '/competitions'; - }else if (match.path.startsWith('/crowdsourcing')) { - headtypes = '/crowdsourcing'; - }else if(match.path.startsWith('/moop_cases')){ - headtypes = '/moop_cases'; - }else if(match.path.startsWith('/developer')){ - headtypes = '/developer' - }else { - headtypes = '/'; - } - } - }else{ - if (match.path === '/forums') { - headtypes = '/forums'; - } else if (match.path.startsWith('/shixuns')) { - headtypes = '/shixuns'; - }else if (match.path.startsWith('/paths')) { - headtypes = '/paths'; - } else if (match.path.startsWith('/courses')) { - headtypes = '/courses'; - }else if (match.path.startsWith('/competitions')) { - headtypes = '/competitions'; - }else if (match.path.startsWith('/crowdsourcing')) { - headtypes = '/crowdsourcing'; - }else if(match.path.startsWith('/moop_cases')){ - headtypes = '/moop_cases'; - }else if(match.path.startsWith('/developer')){ - headtypes = '/developer' - }else { - headtypes = '/'; - } - } + } + } + } // console.log(mygetHelmetapi2); // console.log("NewHeadermygetHelmetapi123123123123"); @@ -907,6 +865,8 @@ submittojoinclass=(value)=>{ } }) } + + return (
@@ -969,7 +929,7 @@ submittojoinclass=(value)=>{ } // console.log(item.hidden); return( -
  • this.headtypesonClick(item.link,true)} className={`${headtypes===undefined?'pr':headtypes===item.link?'pr active':'pr'}`} style={item.hidden==false?{display: 'block'}:{display: 'none'}}> +
  • this.headtypesonClick(item.link,true)} className={`${this.matchpaths(item.link)===true?'pr active':'pr'}`} style={item.hidden==false?{display: 'block'}:{display: 'none'}}> { strbool===true? {item.name} @@ -1109,6 +1069,8 @@ submittojoinclass=(value)=>{ 翻转课堂
  • + {} + {console.log(activeShixuns)}
  • 实训项目 {/**/}