Commit db7003d8 authored by wangxuelai's avatar wangxuelai

''

parent 89aab13d
......@@ -37,6 +37,12 @@ export default {
params: {},
},
});
yield put({
type: 'selectCourseList',
payload: {
params: {},
},
});
},
* pageInit({ payload }, { call, put, select }) {
yield put({
......
......@@ -132,7 +132,7 @@ class CourseBoxForm extends React.Component {
<Card bodyStyle={{ padding: 20, minWidth: '320px' }}>
<Card.Meta
style={{ padding: 0, borderRadius: '6px' }}
avatar={<img className={pageStyle.itemImg} alt="图片" src={imagify(item.cover)} />}
avatar={<img className={pageStyle.itemImg} alt="图片" src={item.cover ? imagify(item.cover) : `${__IMGCDN__}/course/courseDefaultImg.png`} />}
title={
<div className={pageStyle.itemTitleWrap}>
<div className={pageStyle.itemTitle}>{item.title}</div>
......@@ -165,27 +165,6 @@ class CourseBoxForm extends React.Component {
}
/>
{item.status == 2 && <img className={pageStyle.notpublishicon} src={`${__IMGCDN__}/course/notpublish_b.png`} alt="" />}
{/* <div className={pageStyle.editbtn}>
<div className={pageStyle.itemBtn} onClick={() => toEditSingleCourse(item)}>
<Icon style={{ marginRight: 5 }} type="edit" /> 编辑课程
</div>
<Dropdown
className={pageStyle.editStatus}
overlay={
<Menu>
<Menu.Item key="0">
<span onClick={() => changeStatus(item)}>{item.status === 1 ? '下架' : '上架'}</span>
</Menu.Item>
<Menu.Item key="1">
<span onClick={() => delGatherCourse(item)}>删除</span>
</Menu.Item>
</Menu>
}
trigger={['click']}
>
<div className={pageStyle.moreoperate}>更多</div>
</Dropdown>
</div> */}
</Card>
</List.Item>
)}
......
......@@ -252,11 +252,14 @@ class AddCourseModalForm extends React.Component {
<div className={pageStyle.active2title}>选择单课</div>
{courseListTotal == 0 && <Empty description={<span className={pageStyle.emptytext}>您还没有创建单课<br />请直接点击“创建专栏”完成创建</span>} />}
{courseListTotal > 0 &&
<Row className={pageStyle.courseListBox}>
<Row className={pageStyle.courseListBox} gutter={32}>
{courseList.map(ele => (
<Col span={6} style={{ marginBottom: '10px' }} key={ele.id}>
<Checkbox style={{ display: 'flex', alignItems: 'flex-start' }} onChange={() => this.checkedChange(ele.id)} checked={course_ids.indexOf(ele.id) != -1}>
<img className={pageStyle.courseCover} src={imagify(ele.cover)} alt="" />
<Col span={12} style={{ marginBottom: '10px' }} key={ele.id}>
<Checkbox id="1" style={{ display: 'flex', alignItems: 'flex-start' }} onChange={() => this.checkedChange(ele.id)} checked={course_ids.indexOf(ele.id) != -1}>
<div className={pageStyle.colItem} >
<img className={pageStyle.courseCover} src={ele.cover ? imagify(ele.cover || '') : `${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
<div className={pageStyle.courseTitle}>{ele.title}</div>
</div>
</Checkbox>
</Col>
))}
......
......@@ -63,6 +63,18 @@
height: 90px;
border-radius: 6px;
}
.courseTitle {
font-size: 16px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5;
line-clamp: 5;
-webkit-box-orient: vertical;
font-size: 16px;
line-height: 1.3;
}
.active2title {
font-size: 14px;
color: #131313;
......@@ -75,4 +87,12 @@
max-height: 300px;
overflow-y: auto;
padding: 10px 0;
.colItem {
display: flex;
align-items: flex-start;
.courseCover {
margin-left: 8px;
margin-right: 18px;
}
}
}
\ No newline at end of file
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