Commit 6eb36ef5 by chenshu

feat:初始化

parent ed3dacdc
...@@ -18,7 +18,6 @@ import { ...@@ -18,7 +18,6 @@ import {
Select, Select,
Switch, Switch,
TimePicker, TimePicker,
InputNumber,
} from 'antd'; } from 'antd';
import $ from 'jquery'; import $ from 'jquery';
...@@ -167,6 +166,14 @@ class AddOfflineCourse extends React.Component { ...@@ -167,6 +166,14 @@ class AddOfflineCourse extends React.Component {
calendarTime, calendarTime,
courseMediaVOS, courseMediaVOS,
categoryName, categoryName,
signInTimeNum,
signInTimeUnit,
signOutStartTimeNum,
signOutStartTimeUnit,
signOutEndTimeNum,
signOutEndTimeUnit,
signInType,
signOutType,
} = result; } = result;
let coverId; let coverId;
let coverUrl = this.state.coverUrl; let coverUrl = this.state.coverUrl;
...@@ -211,6 +218,14 @@ class AddOfflineCourse extends React.Component { ...@@ -211,6 +218,14 @@ class AddOfflineCourse extends React.Component {
endTimeApply, endTimeApply,
quota, quota,
calendarTime, calendarTime,
signInTimeNum,
signInTimeUnit,
signOutStartTimeNum,
signOutStartTimeUnit,
signOutEndTimeNum,
signOutEndTimeUnit,
signInType,
signOutType,
}); });
}) })
} }
...@@ -964,11 +979,11 @@ class AddOfflineCourse extends React.Component { ...@@ -964,11 +979,11 @@ class AddOfflineCourse extends React.Component {
</div>} </div>}
{whetherSetApply === 'YES' && <div className="switch-item" key="3"> {whetherSetApply === 'YES' && <div className="switch-item" key="3">
<span className="switch-label">报名人数:最多</span> <span className="switch-label">报名人数:最多</span>
<InputNumber <Input
value={quota} value={quota}
style={{ margin: '0 4px' }} style={{ margin: '0 4px', width: 90 }}
onChange={(value) => { onChange={(e) => {
const number = (value + '').replace(/[^\d]/g, ''); const number = (e.target.value + '').replace(/[^\d]/g, '');
this.setState({ quota: number }) this.setState({ quota: number })
}} }}
/> />
...@@ -1003,11 +1018,11 @@ class AddOfflineCourse extends React.Component { ...@@ -1003,11 +1018,11 @@ class AddOfflineCourse extends React.Component {
</div>} </div>}
{whetherSetSignIn === 'YES' && <div className="switch-item" key="3"> {whetherSetSignIn === 'YES' && <div className="switch-item" key="3">
<span className="switch-label">课程开始前</span> <span className="switch-label">课程开始前</span>
<InputNumber <Input
value={signInTimeNum} value={signInTimeNum}
style={{ margin: '0 4px' }} style={{ margin: '0 4px', width: 90 }}
onChange={(value) => { onChange={(e) => {
const number = (value + '').replace(/[^\d]/g, ''); const number = (e.target.value + '').replace(/[^\d]/g, '');
this.setState({ signInTimeNum: number }); this.setState({ signInTimeNum: number });
}} }}
/> />
...@@ -1053,11 +1068,11 @@ class AddOfflineCourse extends React.Component { ...@@ -1053,11 +1068,11 @@ class AddOfflineCourse extends React.Component {
</div>} </div>}
{whetherSetSignOut === 'YES' && <div className="switch-item" key="3"> {whetherSetSignOut === 'YES' && <div className="switch-item" key="3">
<span className="switch-label">课程开始后</span> <span className="switch-label">课程开始后</span>
<InputNumber <Input
value={signOutStartTimeNum} value={signOutStartTimeNum}
style={{ margin: '0 4px' }} style={{ margin: '0 4px', width: 90 }}
onChange={(value) => { onChange={(e) => {
const number = (value + '').replace(/[^\d]/g, ''); const number = (e.target.value + '').replace(/[^\d]/g, '');
this.setState({ signOutStartTimeNum: number }); this.setState({ signOutStartTimeNum: number });
}} }}
/> />
...@@ -1073,11 +1088,11 @@ class AddOfflineCourse extends React.Component { ...@@ -1073,11 +1088,11 @@ class AddOfflineCourse extends React.Component {
))} ))}
</Select> </Select>
<span className="switch-label">就可签退,截止签退时间为下课后</span> <span className="switch-label">就可签退,截止签退时间为下课后</span>
<InputNumber <Input
value={signOutEndTimeNum} value={signOutEndTimeNum}
style={{ margin: '0 4px' }} style={{ margin: '0 4px', width: 90 }}
onChange={(value) => { onChange={(e) => {
const number = (value + '').replace(/[^\d]/g, ''); const number = (e.target.value + '').replace(/[^\d]/g, '');
this.setState({ signOutEndTimeNum: number }); this.setState({ signOutEndTimeNum: number });
}} }}
/> />
......
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