Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_home
SylorHuang 5 years ago
commit f4d0927f0a

@ -118,21 +118,24 @@ class ShixunsHome extends Component {
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(item.hidden===true){
shixuntype=true
}
}
if(paths.match(reg)){
pathstype=true
if(item.hidden===true){
pathstype=true
}
}
})
}
}
return (
<div className="newMain clearfix backFAFAFA shixunsHome">
{this.state.updata===undefined?"":<UpgradeModals
@ -232,7 +235,7 @@ class ShixunsHome extends Component {
</div>
{/*实训路径*/}
{pathstype===true?<div className="clearfix pt20 educontent pr pb20">
{pathstype===true?"":<div className="clearfix pt20 educontent pr pb20">
<div className="edu-txt-center">
<p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>实践课程</p>
<p className="color-grey-cd font-12">TRAINING COURSE</p>
@ -308,10 +311,10 @@ class ShixunsHome extends Component {
}
</div>
</div>:""}
</div>}
{/*精选实训 改为 开发社区*/}
{shixuntype===true?<div className="clearfix pt20 educontent pr pb20">
{shixuntype===true?"":<div className="clearfix pt20 educontent pr pb20">
<div className="edu-txt-center">
<p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>实训项目</p>
<p className="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p>
@ -403,7 +406,7 @@ class ShixunsHome extends Component {
</div>
</div>:""}
</div>}

@ -875,8 +875,26 @@ submittojoinclass=(value)=>{
// console.log("NewHeadergetHelmetapi432423423423");
// console.log(mygetHelmetapi2);
// console.log("NewHeadermygetHelmetapi123123123123");
// console.log(mygetHelmetapi2);
let shixuntype=false;
let pathstype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns";
let paths="/paths";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(shixun.match(reg)){
if(item.hidden===true){
shixuntype=true
}
}
if(paths.match(reg)){
if(item.hidden===true){
pathstype=true
}
}
})
}
return (
<div className="newHeaders" id="nHeader" >
@ -1261,9 +1279,9 @@ submittojoinclass=(value)=>{
<div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline">
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><a onClick={(url)=>this.getUser("/courses/new")}>新建翻转课堂</a></li>}
<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>
{shixuntype===true?"":<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>}
{this.props.Headertop===undefined?"":
<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
pathstype===true?"":<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
}
<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>
</ul>

@ -34,6 +34,25 @@ class InfosBanner extends Component{
// console.log(is_current)
// console.log(current_user)
// console.log(current_user.is_teacher)
let shixuntype=false;
let pathstype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns";
let paths="/paths";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(shixun.match(reg)){
if(item.hidden===true){
shixuntype=true
}
}
if(paths.match(reg)){
if(item.hidden===true){
pathstype=true
}
}
})
}
return(
<div className="bannerPanel mb60">
@ -96,16 +115,16 @@ class InfosBanner extends Component{
onClick={() => this.setState({moduleName: 'courses'})}
to={`/users/${username}/courses`}>翻转课堂</Link>
</li>
<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
{shixuntype===true?"":<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'shixuns'})}
to={`/users/${username}/shixuns`}>实训项目</Link>
</li>
<li className={`${moduleName == 'paths' ? 'active' : '' }`}>
</li>}
{pathstype===true?"":<li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>实践课程</Link>
</li>
</li>}
<li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'projects'})}

Loading…
Cancel
Save