调整 权限

mast_item_banktwo
杨树林 5 years ago
parent f585a65b19
commit e0dee2101f

@ -42,11 +42,11 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
debugType="admin";
// debugType="admin";
// 老师
// debugType="teacher";
// 学生
// debugType="student";
debugType="student";

@ -945,6 +945,28 @@ submittojoinclass=(value)=>{
<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" >
@ -1052,6 +1074,8 @@ submittojoinclass=(value)=>{
`
}
</style>
{
Periofters===true?
<li className={`pr questionbanks`} >
<Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
@ -1063,6 +1087,9 @@ submittojoinclass=(value)=>{
</div>
</Popover>
</li>
:""
}
<li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}}

Loading…
Cancel
Save