Commit 2ae07a65 authored by wangxuelai's avatar wangxuelai

''

parent a12a9c70
......@@ -1580,7 +1580,7 @@ export default {
...editSingleCourseInfo,
...value,
id,
content: JSON.stringify(editSingleCourseInfo.content),
content: editSingleCourseInfo.content ? JSON.stringify(editSingleCourseInfo.content) : '',
});
} else {
saveData = yield call(onlineAjax.editCourse, {
......@@ -1599,6 +1599,7 @@ export default {
});
const { code, data } = saveData;
if (code == 200) {
message.success('保存成功', 1);
yield put({
type: 'selectCourseList',
payload: {
......
......@@ -27,7 +27,6 @@ class CourseBoxForm extends React.Component {
title,
start_time,
} = values;
console.log(start_time, 'start_time');
save({
title,
start_time: moment(start_time).format('YYYY-MM-DD HH:mm'),
......@@ -303,7 +302,7 @@ class CourseBoxForm extends React.Component {
</FormItem>
<FormItem {...formItemModalLineLayout} label="开课时间">
{getFieldDecorator('start_time', {
initialValue: editSingleCourseInfo.start_time ? moment(editSingleCourseInfo.start_time, 'YYYY-MM-DD HH:mm') : null,
initialValue: editSingleCourseInfo.start_time ? moment(editSingleCourseInfo.start_time, 'YYYY-MM-DD HH:mm') : moment(new Date(), 'YYYY-MM-DD'),
rules: [
{
required: true,
......
......@@ -199,8 +199,8 @@ class AddCourseModalForm extends React.Component {
],
})(
<Radio.Group>
<Radio value="2">免费</Radio>
<Radio value="1">加密</Radio>
<Radio value="2">不加密</Radio>
</Radio.Group>,
)}
</FormItem>
......
......@@ -159,6 +159,7 @@ class AddCourseModalForm extends React.Component {
</FormItem>
<FormItem {...formItemModalLineLayout} label="开课时间">
{getFieldDecorator('time', {
initialValue: moment(new Date(), 'YYYY-MM-DD'),
rules: [
{
required: true,
......@@ -195,8 +196,8 @@ class AddCourseModalForm extends React.Component {
],
})(
<Radio.Group>
<Radio value="2">免费</Radio>
<Radio value="1">加密</Radio>
<Radio value="2">不加密</Radio>
</Radio.Group>,
)}
</FormItem>
......
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