diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js
index f335f1705..4acbb35a7 100644
--- a/public/react/config/webpack.config.dev.js
+++ b/public/react/config/webpack.config.dev.js
@@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
- devtool: "source-map", // 开启调试
+ //devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js
index 67fbab26b..ab51853ed 100644
--- a/public/react/src/modules/home/shixunsHome.js
+++ b/public/react/src/modules/home/shixunsHome.js
@@ -112,13 +112,27 @@ class ShixunsHome extends Component {
}
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
- // console.log(myValue-Math.floor(myValue))
- // if (myValue < Math.ceil(myValue)) {
- // myValue = Math.floor(myValue) + 0.5;
- // }
-
return ;
};
+
+ let shixuntype=false;
+ let pathstype=false;
+ if(this.props&&this.props.mygetHelmetapi!=null){
+ console.log(this.props.mygetHelmetapi.navbar)
+ let shixun="/shixuns";
+ let paths="/paths";
+ this.props.mygetHelmetapi.navbar.map((item,key)=>{
+ var reg = RegExp(item.link);
+ if(shixun.match(reg)){
+ shixuntype=true
+ }
+ if(paths.match(reg)){
+ pathstype=true
+ }
+ })
+
+
+ }
return (
{this.state.updata===undefined?"":
}
-
+ {this.props.user&&this.props.user.main_site===true?
{homedatalist === undefined ? "" :homedatalistreps.map((item,key)=>{
@@ -212,13 +226,13 @@ class ShixunsHome extends Component {
}
-
+
:""}
{/*实训路径*/}
-
+ {pathstype===true?
实践课程
TRAINING COURSE
@@ -294,10 +308,10 @@ class ShixunsHome extends Component {
}
-
+
:""}
{/*精选实训 改为 开发社区*/}
-
+ {shixuntype===true?
实训项目
DEVELOPMENT COMMUNITY
@@ -389,13 +403,13 @@ class ShixunsHome extends Component {
-
+
:""}
- {/*导师排行榜*/}
+ {/*导师排行榜*/}
{ homedatalist !== undefined && homedatalist.teachers !== undefined && (
-
+ this.props.user&&this.props.user.main_site===true?
导师排行榜
@@ -470,12 +484,12 @@ class ShixunsHome extends Component {
-
+
:""
)}
{/*程序员排行榜*/}
{ homedatalist !== undefined && homedatalist.students !== undefined && (
-
+ this.props.user&&this.props.user.main_site===true?
程序员排行榜
@@ -546,7 +560,7 @@ class ShixunsHome extends Component {
-
+
:""
)}
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 8a313a904..4de133b39 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -876,7 +876,7 @@ submittojoinclass=(value)=>{
// console.log(mygetHelmetapi2);
// console.log("NewHeadermygetHelmetapi123123123123");
// console.log(mygetHelmetapi2);
- // console.log(this.props);
+
return (
:""}
{TPMRightSectionData === undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "" :
-
-
}
-
+ :""
+ }
}
diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js
index 40732d757..82a52ba95 100644
--- a/public/react/src/modules/user/usersInfo/InfosBanner.js
+++ b/public/react/src/modules/user/usersInfo/InfosBanner.js
@@ -34,7 +34,7 @@ class InfosBanner extends Component{
// console.log(is_current)
// console.log(current_user)
// console.log(current_user.is_teacher)
- // console.log(current_user.admin)
+
return(
@@ -116,20 +116,20 @@ class InfosBanner extends Component{
{/* onClick={() => this.setState({moduleName: 'package'})}*/}
{/* to={`/users/${username}/package`}>众包*/}
{/**/}
- {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
+ {this.props.user&&this.props.user.main_site===true?((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
&&
this.setState({moduleName: 'videos'})}
to={`/users/${username}/videos`}>视频
- }
+ :""}
{/*自己的主页且不是学生显示题库按钮*/}
- {(is_current && current_user&& current_user.is_teacher )
+ {this.props.user&&this.props.user.main_site===true?(is_current && current_user&& current_user.is_teacher )
&&
this.setState({moduleName: 'topics'})}
to={`/users/${username}/topics/personal`}>题库
- }
+ :""}