|
|
|
@ -750,46 +750,68 @@ class NewHeader extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// console.log(mygetHelmetapi2);
|
|
|
|
|
// console.log("NewHeadermygetHelmetapi123123123123");
|
|
|
|
|
|
|
|
|
|
let shixuntype = false;
|
|
|
|
|
let pathstype = false;
|
|
|
|
|
let coursestypes = false;
|
|
|
|
|
if (this.props && this.props.mygetHelmetapi != null) {
|
|
|
|
|
let shixun = "/shixuns";
|
|
|
|
|
let paths = "/paths";
|
|
|
|
|
let courses = "/courses";
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (courses.match(reg)) {
|
|
|
|
|
if (item.hidden === true) {
|
|
|
|
|
coursestypes = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const contents = (
|
|
|
|
|
<div className="questiontypes" style={{
|
|
|
|
|
width: '93px',
|
|
|
|
|
height: '80px',
|
|
|
|
|
}}>
|
|
|
|
|
<a href={'/question'} className={"popovertests"} ><p className="questiontype">试题库</p></a>
|
|
|
|
|
<p className="questiontypeheng"></p>
|
|
|
|
|
<a href={'/paperlibrary'} className={"popovertests"} ><p className="questiontype">试卷库</p></a>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
return (
|
|
|
|
|
// console.log("NewHeadermygetHelmetapi123123123123");
|
|
|
|
|
|
|
|
|
|
let shixuntype=false;
|
|
|
|
|
let pathstype=false;
|
|
|
|
|
let coursestypes=false;
|
|
|
|
|
if(this.props&&this.props.mygetHelmetapi!=null){
|
|
|
|
|
let shixun="/shixuns";
|
|
|
|
|
let paths="/paths";
|
|
|
|
|
let courses="/courses";
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(courses.match(reg)){
|
|
|
|
|
if(item.hidden===true){
|
|
|
|
|
coursestypes=true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const contents = (
|
|
|
|
|
<div className="questiontypes" style={{
|
|
|
|
|
width:'93px',
|
|
|
|
|
height:'80px',
|
|
|
|
|
}}>
|
|
|
|
|
<a href={'/question'} className={"popovertests"} ><p className="questiontype">试题库</p></a>
|
|
|
|
|
<p className="questiontypeheng"></p>
|
|
|
|
|
<a href={'/paperlibrary'} className={"popovertests"} ><p className="questiontype">试卷库</p></a>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// console.log("头部");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
//判断平台身份
|
|
|
|
|
let Periofters=false;
|
|
|
|
|
if(this.props){
|
|
|
|
|
if(this.props.current_user){
|
|
|
|
|
if(this.props.current_user.admin){
|
|
|
|
|
Periofters=true;
|
|
|
|
|
}
|
|
|
|
|
else if(this.props.current_user.business){
|
|
|
|
|
Periofters=true;
|
|
|
|
|
}
|
|
|
|
|
else if(this.props.current_user.is_teacher){
|
|
|
|
|
Periofters=true;
|
|
|
|
|
}else if(this.props.current_user.user_identity !=="学生") {
|
|
|
|
|
Periofters=true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className="newHeaders" id="nHeader" >
|
|
|
|
|
<style>{
|
|
|
|
@ -896,17 +918,22 @@ class NewHeader extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{/*<li className={`pr questionbanks`} >*/}
|
|
|
|
|
{/* <Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >*/}
|
|
|
|
|
{/* <div className=" sortinxdirection mr10">*/}
|
|
|
|
|
{/* <div style={{*/}
|
|
|
|
|
{/* color:"#fff"*/}
|
|
|
|
|
{/* }}>*/}
|
|
|
|
|
{/* 题库*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/* </Popover>*/}
|
|
|
|
|
{/*</li>*/}
|
|
|
|
|
{
|
|
|
|
|
Periofters===true?
|
|
|
|
|
<li className={`pr questionbanks`} >
|
|
|
|
|
<Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
|
|
|
|
|
<div className=" sortinxdirection mr10">
|
|
|
|
|
<div style={{
|
|
|
|
|
color:"#fff"
|
|
|
|
|
}}>
|
|
|
|
|
题库
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Popover>
|
|
|
|
|
</li>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}}
|
|
|
|
|