Commit fb7e2973 by wangshuo

习题权限判断

parent 0dc80fe3
......@@ -35,6 +35,7 @@ class VideoCatalog extends Component {
</div>
{
this.props.isAist ? (
item.video_auth ? (
(item.practice && item.practice.qid)
? <Link to={{
pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
......@@ -43,13 +44,22 @@ class VideoCatalog extends Component {
}}>
<div className="exercise">
课后练习:{item.practice.title}
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : item.practice.is_tested ? 'iconiconfront-3' : '')}/>
<i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : '')}/>
</div>
</Link>
: null
) : (
<a href="javascript:void(0)">
<div className="exercise">
课后练习:{item.practice.title}
<i className={classnames('iconfont','iconiconfront-74')}/>
</div>
</a>
)
) : (
item.practice_common.map((commonItem, index) => {
return (
item.video_auth ? (
<Link to={{
pathname: commonItem.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${commonItem.qid}`,
......@@ -57,9 +67,17 @@ class VideoCatalog extends Component {
}} key={index}>
<div className="exercise">
课后练习:{commonItem.title}
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : commonItem.is_tested ? 'iconiconfront-3' : '')}/>
<i className={classnames('iconfont',commonItem.is_tested ? 'iconiconfront-3' : '')}/>
</div>
</Link>
) : (
<a href="javascript:void(0)">
<div className="exercise">
课后练习:{commonItem.title}
<i className={classnames('iconfont','iconiconfront-74')}/>
</div>
</a>
)
)
})
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment