|
|
|
@ -77,12 +77,11 @@ class LiveNew extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleSubmit=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:true
|
|
|
|
|
})
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
if(!err){
|
|
|
|
|
console.log(values);
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:true
|
|
|
|
|
})
|
|
|
|
|
const { liveId } = this.props;
|
|
|
|
|
if(liveId){
|
|
|
|
|
// 修改
|
|
|
|
@ -102,14 +101,17 @@ class LiveNew extends Component{
|
|
|
|
|
live_time:beginTime
|
|
|
|
|
}).then(result=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification("修改成功!");
|
|
|
|
|
const { setliveVisibel } = this.props;
|
|
|
|
|
setliveVisibel && setliveVisibel(false,true);
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
}).catch(error=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -124,14 +126,17 @@ class LiveNew extends Component{
|
|
|
|
|
live_time:beginTime
|
|
|
|
|
}).then(result=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification("添加成功!");
|
|
|
|
|
const { setliveVisibel } = this.props;
|
|
|
|
|
setliveVisibel && setliveVisibel(false,true);
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
}).catch(error=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpining:false
|
|
|
|
|
})
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -186,7 +191,7 @@ class LiveNew extends Component{
|
|
|
|
|
<Modal
|
|
|
|
|
visible={visible}
|
|
|
|
|
width="560px"
|
|
|
|
|
title={'直播设置'}
|
|
|
|
|
title={'添加直播'}
|
|
|
|
|
footer={null}
|
|
|
|
|
closable={false}
|
|
|
|
|
className="liveModal"
|
|
|
|
@ -196,9 +201,9 @@ class LiveNew extends Component{
|
|
|
|
|
<Form onSubmit={this.handleSubmit}>
|
|
|
|
|
<Form.Item label={`直播课程`}>
|
|
|
|
|
{getFieldDecorator('course_name', {
|
|
|
|
|
rules: [{required: true, message: "请输入课程名字"}],
|
|
|
|
|
rules: [{required: true, message: "请输入课程名称"}],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder="请输入课程名字" />
|
|
|
|
|
<Input placeholder="请输入课程名称" />
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label={`直播平台`}>
|
|
|
|
@ -225,7 +230,7 @@ class LiveNew extends Component{
|
|
|
|
|
<DatePicker
|
|
|
|
|
dropdownClassName="hideDisable"
|
|
|
|
|
className="timeStyle mb20"
|
|
|
|
|
placeholder="年/月/日"
|
|
|
|
|
placeholder="如:2020/02/02 12:00"
|
|
|
|
|
style={{width:"220px"}}
|
|
|
|
|
showTime={{ format: 'HH:mm' }}
|
|
|
|
|
locale={locale}
|
|
|
|
|