|
|
|
@ -48,7 +48,8 @@ class CoursesNew extends Component {
|
|
|
|
|
addonAfteronelenone:0,
|
|
|
|
|
addonAfteronelentwo:0,
|
|
|
|
|
bordebool:false,
|
|
|
|
|
smallspinning:false
|
|
|
|
|
smallspinning:false,
|
|
|
|
|
bottonloading:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
@ -217,7 +218,9 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!err) {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log('Received values of form: ', values);
|
|
|
|
@ -240,7 +243,7 @@ class CoursesNew extends Component {
|
|
|
|
|
if (response.data.status === 0) {
|
|
|
|
|
// this.goback()
|
|
|
|
|
|
|
|
|
|
window.location.href=first_category_url;
|
|
|
|
|
window.location.href=first_category_url;
|
|
|
|
|
if(this.state.boolxinjian===true) {
|
|
|
|
|
var yslGuideone = window.localStorage.getItem('yslGuideone');
|
|
|
|
|
try {
|
|
|
|
@ -257,11 +260,19 @@ class CoursesNew extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
@ -283,6 +294,9 @@ class CoursesNew extends Component {
|
|
|
|
|
// debugger
|
|
|
|
|
//新建
|
|
|
|
|
// console.log('Received values of form: ', values);
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let url = "/courses.json";
|
|
|
|
|
axios.post(url, {
|
|
|
|
@ -300,6 +314,7 @@ class CoursesNew extends Component {
|
|
|
|
|
).then((response) => {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
// this.goback
|
|
|
|
|
|
|
|
|
|
window.location.href=response.data.first_category_url;
|
|
|
|
|
if(this.state.boolxinjian===true){
|
|
|
|
|
var yslGuideone = window.localStorage.getItem('yslGuideone');
|
|
|
|
@ -318,11 +333,19 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
bottonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -934,7 +957,7 @@ class CoursesNew extends Component {
|
|
|
|
|
<div className={"FAFAFA"}>
|
|
|
|
|
<Form.Item >
|
|
|
|
|
<div className="clearfix mt40 mb30">
|
|
|
|
|
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
|
|
|
|
|
<Button type="primary" htmlType="submit" loading={this.state.bottonloading} className="defalutSubmitbtn fl mr20">
|
|
|
|
|
提交
|
|
|
|
|
</Button>
|
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20">提交</a>*/}
|
|
|
|
|