Commit fb7e2973 by wangshuo

习题权限判断

parent 0dc80fe3
...@@ -35,31 +35,49 @@ class VideoCatalog extends Component { ...@@ -35,31 +35,49 @@ class VideoCatalog extends Component {
</div> </div>
{ {
this.props.isAist ? ( this.props.isAist ? (
(item.practice && item.practice.qid) item.video_auth ? (
? <Link to={{ (item.practice && item.practice.qid)
pathname: item.practice.is_tested ? '/campResolve' : '/campTest', ? <Link to={{
search: `?keshi_id=${item.id}&qid=${item.practice.qid}`, pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
state: {from: `/play/video${window.location.search}`} search: `?keshi_id=${item.id}&qid=${item.practice.qid}`,
}}> state: {from: `/play/video${window.location.search}`}
<div className="exercise"> }}>
课后练习:{item.practice.title} <div className="exercise">
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : item.practice.is_tested ? 'iconiconfront-3' : '')}/> 课后练习:{item.practice.title}
</div> <i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : '')}/>
</Link> </div>
: null </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) => { item.practice_common.map((commonItem, index) => {
return ( return (
<Link to={{ item.video_auth ? (
pathname: commonItem.is_tested ? '/campResolve' : '/campTest', <Link to={{
search: `?keshi_id=${item.id}&qid=${commonItem.qid}`, pathname: commonItem.is_tested ? '/campResolve' : '/campTest',
state: {from: `/play/video${window.location.search}`} search: `?keshi_id=${item.id}&qid=${commonItem.qid}`,
}} key={index}> state: {from: `/play/video${window.location.search}`}
<div className="exercise"> }} key={index}>
课后练习:{commonItem.title} <div className="exercise">
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : commonItem.is_tested ? 'iconiconfront-3' : '')}/> 课后练习:{commonItem.title}
</div> <i className={classnames('iconfont',commonItem.is_tested ? 'iconiconfront-3' : '')}/>
</Link> </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