Commit cfe62e0e by wangshuo

练习题数量显示问题 以及样式优化

parent 4be7157c
......@@ -851,6 +851,7 @@ class Video extends Component {
activeIndex={this.state.activeIndex}
selectVideo={this.selectVideo}
videoCatalog={videoList}
isAist={course.is_aist}
{...props}
/>
);
......
......@@ -34,7 +34,8 @@ class VideoCatalog extends Component {
)}/>
</div>
{
(item.practice && item.practice.qid)
this.props.isAist ? (
(item.practice && item.practice.qid)
? <Link to={{
pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${item.practice.qid}`,
......@@ -46,6 +47,22 @@ class VideoCatalog extends Component {
</div>
</Link>
: null
) : (
item.practice_common.map((commonItem, index) => {
return (
<Link to={{
pathname: commonItem.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${commonItem.qid}`,
state: {from: `/play/video${window.location.search}`}
}} key={index}>
<div className="exercise">
课后练习:{commonItem.title}
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : commonItem.is_tested ? 'iconiconfront-3' : '')}/>
</div>
</Link>
)
})
)
}
</li>
)
......
......@@ -33,11 +33,16 @@
}
}
a:last-child {
.exercise {
margin-bottom: 15px;
}
}
.exercise {
padding-left: 15px;
height: 35px;
background: #F5FBFF;
margin-bottom: 15px;
line-height: 35px;
font-size: $font_12;
color: #000;
......
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