diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1454e120..6a1b314e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,11 +3,8 @@
-
-
-
-
-
+
+
@@ -31,11 +28,11 @@
-
-
+
+
-
-
+
+
@@ -43,25 +40,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- item-list-right
- form .ant-select
- form .ant-cascader-picker, form .ant-select
- .detailContent
- .ant-spin-nested-loading
- .newFooter
- topmerge_btn
- mergediv
- index
- prdetail
- showNotification
- copy_rep_content
- CloneAddress
- branchLastCommit
- CoderRootDirectory
该合并请求可以进行自动合并操作
entries
/branches
@@ -77,15 +89,30 @@
subFileType
coders
upda
+ 创建
+ new_he
+ /settings
+ /setting
+ head-navpre3
+ header-nav
+ mygetHelmetapi2
+ .ico
+ gettablogourlnull
+ activeForums
+ matchpaths
+ 新建翻转
+ chrome
+ geturlsdata
+ edu-menu-list
任务
- $PROJECT_DIR$
$PROJECT_DIR$/src/forge/Merge
$PROJECT_DIR$/src/forge
$PROJECT_DIR$/src
+ $PROJECT_DIR$
@@ -96,7 +123,6 @@
-
@@ -138,6 +164,8 @@
+
+
@@ -151,7 +179,6 @@
-
@@ -175,17 +202,11 @@
-
-
-
-
-
-
-
+
@@ -201,6 +222,7 @@
+
@@ -251,20 +273,22 @@
-
+
+
+
-
+
+
-
+
-
@@ -275,8 +299,9 @@
-
+
+
@@ -337,40 +362,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -455,16 +446,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -517,13 +498,6 @@
-
-
-
-
-
-
-
@@ -793,26 +767,81 @@
-
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/tpm/NewFooter.js b/src/modules/tpm/NewFooter.js
index 051bfadc..65f89eeb 100644
--- a/src/modules/tpm/NewFooter.js
+++ b/src/modules/tpm/NewFooter.js
@@ -4,7 +4,30 @@ import { Link } from 'react-router-dom';
class NewFooter extends Component {
+ constructor(props) {
+ super(props)
+ this.state={
+ forge_footer: undefined
+ }
+ }
+ componentDidMount() {
+
+ //获取游览器地址
+ try {
+ var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
+ this.setState({
+ forge_footer: chromesettingArray.footer
+ })
+ } catch (e) {
+ }
+ }
+ showhtml=(htmlString)=>{
+ var html = {__html:htmlString};
+ return
;
+ }
+
render() {
+ const {forge_footer} = this.state;
return (
+ {
+ forge_footer && this.showhtml(forge_footer)
+ }
-
-
- - 网站首页
- - 关于我们
- - 联系我们
- - 合作伙伴
- - 服务协议
- - 帮助中心
- - 意见反馈
-
-
-
-
+ {/*
*/}
+ {/*
*/}
+ {/*- 网站首页
*/}
+ {/*- 关于我们
*/}
+ {/*- 联系我们
*/}
+ {/*- 合作伙伴
*/}
+ {/*- 服务协议
*/}
+ {/*- 帮助中心
*/}
+ {/*- 意见反馈
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
);
}
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index 8cce393d..c6e9fe1a 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -730,7 +730,6 @@ submittojoinclass=(value)=>{
try {
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
-
this.setState({
mygetHelmetapi2:chromesettingArray
});
@@ -788,25 +787,40 @@ 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
+ if (url=== '/forums'&&match.path === '/forums') {
+ return true
+ } else if (url.startsWith('/projects')&&match.path.startsWith('/projects')) {
+ return true
}else if (url.startsWith('/paths')&&match.path.startsWith('/paths')) {
- return true
+ return true
} else if (url.startsWith('/courses')&&match.path.startsWith('/courses')) {
- return true
+ return true
}else if (url.startsWith('/competitions')&&match.path.startsWith('/competitions')) {
- 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
+ return true
+ }else if (url.startsWith('/statistics')&&match.path.startsWith('/statistics')) {
+ return true
+ } else {
+ return false
}
+ // 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('/competitions')) {
+ // 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
+ // }
}
@@ -820,6 +834,7 @@ submittojoinclass=(value)=>{
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
const {match} = this.props;
+
let {Addcoursestypes,
tojoinitemtype,
tojoinclasstitle,
@@ -999,24 +1014,52 @@ submittojoinclass=(value)=>{
mygetHelmetapi2.navbar && mygetHelmetapi2.navbar.map((item,key)=>{
// console.log("headtypes");
// console.log(headtypes);hidden
- var str=new RegExp("http");
- var strbool=false;
- //test方法返回值为(true或者false)
- if(item.link){
- if(str.test(item.link)===true){
- strbool=true
- }else{
- strbool=false
- }
- }
+ // var str=new RegExp("http");
+ // var strbool=false;
+ // //test方法返回值为(true或者false)
+ // if(item.link){
+ // if(str.test(item.link)===true){
+ // strbool=true
+ // }else{
+ // strbool=false
+ // }
+ // }
+ var new_link = item.link;
+ var user_login = this.props.user && this.props.user.login;
+ var is_hidden = item.hidden
+
+ if(new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1){
+ if(user_login){
+ if(new_link.indexOf("courses") > -1){
+ new_link = new_link.replace(/courses/g,"users/"+user_login + "/courses")
+ }else if(new_link.indexOf("contests") > -1){
+ new_link = new_link.replace(/contests/g,"users/"+user_login + "/contests")
+ }
+
+ }else{
+ is_hidden = true
+ }
+ }
+
+ var str=new RegExp("projects");
+ var strbool=false;
+ //test方法返回值为(true或者false)
+ if(item.link){
+ if(str.test(item.link)===true){
+ strbool=true
+ }else{
+ strbool=false
+ }
+ }
// console.log(item.hidden);
return(
- this.headtypesonClick(item.link,true)} className={`${this.matchpaths(item.link)===true?'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={!is_hidden?{display: 'block'}:{display: 'none'}}>
{
- strbool===true?
- {item.name}
+ strbool?
+ {item.name}
+
:
- {item.name}
+ {item.name}
}
)
@@ -1046,30 +1089,30 @@ submittojoinclass=(value)=>{
{/* */}
{/* */}
{/**/}
+
+ {/*工程认证*/}
- 工程认证
-
- 0 ? 'block' : 'none'}}>
- 职业路径
- 0 ? 'block' : 'none'}}>
-
- {this.props.Headertop === undefined ? "" : this.props.Headertop.career_url.map((item, key) => {
- return(
- - {item.name}
- )
- })
- }
-
-
-
- 开源项目
+ {/* 0 ? 'block' : 'none'}}>*/}
+ {/*职业路径*/}
+ {/* 0 ? 'block' : 'none'}}>*/}
+ {/*
*/}
+ {/*{this.props.Headertop === undefined ? "" : this.props.Headertop.career_url.map((item, key) => {*/}
+ {/*return(*/}
+ {/*- {item.name}
*/}
+ {/*)*/}
+ {/*})*/}
+ {/*}*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+ {/*开源项目*/}
:
@@ -1218,28 +1261,44 @@ submittojoinclass=(value)=>{
src={getImageUrl(`images/`+user.image_url)} width="34">
-