Commit 8e79a74d authored by baixian's avatar baixian

bug修改

parent 15d45621
......@@ -304,7 +304,7 @@ class ManageCourse extends React.Component { // eslint-disable-line
onOk={this.submit}
className="managecoursecontainer"
bodyStyle={{
padding: '40px 20px',
padding: '0px 20px 20px',
}}
>
<DndProvider backend={HTML5Backend}>
......@@ -318,6 +318,7 @@ class ManageCourse extends React.Component { // eslint-disable-line
})}
/> */}
<Table
title={() => <div style={{ fontSize: 14 }}>直接点击拖拽课程,可以修改专栏课程排序喔</div>}
rowKey="id"
columns={columns}
dataSource={list}
......
......@@ -239,7 +239,7 @@ class StaticCenter extends React.Component {
}
changeStatus = (key) => {
const { dispatch } = this.props;
if (key == 1) {
if (Number(key) === 1) {
Modal.confirm({
title: '确认下架吗?',
okButtonProps: {
......@@ -264,7 +264,7 @@ class StaticCenter extends React.Component {
onCancel() {
},
});
} else if (key == 2) {
} else if (Number(key) === 2) {
Modal.confirm({
title: '确认上架吗?',
// okButtonProps: {
......@@ -852,7 +852,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.gatherstatus}>已发布</div>
}
{gatherDetail.status && gatherDetail.status == 2 &&
<div className={pageStyle.gatherstatusnotpublish}>已下架</div>
<div className={pageStyle.gatherstatusnotpublish}>未发布</div>
}
<div className={pageStyle.gathertime}>创建于:{gatherDetail.created_at || ''}</div>
</div>
......
......@@ -26,7 +26,7 @@ const MediaCard = (props) => {
<div className={pageStyle.coursecount}><span style={{ color: 'red', paddingRight: '2px' }}>{info.sub_courses_count}</span>个课程</div>
</div>
</div>
{info.status == 2 && <img className={pageStyle.notpublishicon} src={`${__IMGCDN__}course/notpublish_a.png`} alt="" />}
{info.status == 2 && <img className={pageStyle.notpublishicon} src={`${__IMGCDN__}course/notpublish_b.png`} alt="" />}
</div>
</Col>
);
......
......@@ -14,11 +14,11 @@
cursor: pointer;
border: 1px solid rgb(232, 232, 232);
.notpublishicon {
width: 49px;
height: 43px;
width: 71px;
height: 44px;
position: absolute;
right: 13px;
bottom: 7px;
right: 4px;
bottom: 27px;
}
.image {
width: 166px;
......
......@@ -59,12 +59,48 @@ class singleDetailForm extends React.Component {
}
changeStatus = (key) => {
const { dispatch } = this.props;
dispatch({
type: 'onlineclasses/changeCourseStatus',
payload: {
status: key === 1 ? 2 : 1,
},
});
if (Number(key) === 1) {
Modal.confirm({
title: '确认下架吗?',
okButtonProps: {
type: 'danger',
style: {
color: '#fff',
backgroundColor: '#ff4d4f',
borderColor: '#ff4d4f',
},
},
centered: true,
icon: <Icon type="info-circle" style={{ color: 'red' }} />,
onOk() {
dispatch({
type: 'onlineclasses/changeCourseStatus',
payload: {
status: key === 1 ? 2 : 1,
},
});
},
zIndex: 1100,
onCancel() {
},
});
} else if (Number(key) === 2) {
Modal.confirm({
title: '确认上架吗?',
centered: true,
onOk() {
dispatch({
type: 'onlineclasses/changeCourseStatus',
payload: {
status: key === 1 ? 2 : 1,
},
});
},
zIndex: 1100,
onCancel() {
},
});
}
}
uploadCourseware = (values) => {
const { dispatch } = this.props;
......
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