个人中心-新建块

dev_forum
caishi 5 years ago
parent 70a65eec18
commit 73c391796e

@ -101,7 +101,6 @@ class InfosCourse extends Component{
totalCount,
isSpin
} = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current;
// console.log(this.props.current_user&&this.props.current_user.user_identity==="学生")
@ -127,11 +126,11 @@ class InfosCourse extends Component{
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
page == 1 && is_current &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
}
{
(!data || data.courses.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.courses.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.courses && data.courses.map((item,key)=>{

@ -148,11 +148,11 @@ class InfosPath extends Component{
</div>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>
page == 1 && is_current &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:""
}
{
(!data || data.subjects.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.subjects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.subjects && data.subjects.map((item,key)=>{

@ -121,11 +121,11 @@ class InfosProject extends Component{
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>
page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:""
}
{
(!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.projects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.projects && data.projects.map((item,key)=>{

@ -157,11 +157,11 @@ class InfosShixun extends Component{
</div>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>
page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>:""
}
{
(!data || data.shixuns.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.shixuns.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.shixuns && data.shixuns.map((item,key)=>{

Loading…
Cancel
Save