|
|
|
@ -132,7 +132,7 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
let coursesId = this.props.match.params.coursesId;
|
|
|
|
|
let {is_public} = this.state
|
|
|
|
|
let {is_public,datatime} = this.state
|
|
|
|
|
// console.log(is_public)
|
|
|
|
|
|
|
|
|
|
if (coursesId != undefined) {
|
|
|
|
@ -173,7 +173,7 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log('Received values of form: ', values);
|
|
|
|
|
let {datatime} = this.state;
|
|
|
|
|
|
|
|
|
|
let url = "/courses/" + coursesId + ".json";
|
|
|
|
|
axios.put(url, {
|
|
|
|
|
course_list_name: values.course,
|
|
|
|
@ -227,7 +227,7 @@ class CoursesNew extends Component {
|
|
|
|
|
// debugger
|
|
|
|
|
//新建
|
|
|
|
|
// console.log('Received values of form: ', values);
|
|
|
|
|
let {datatime} = this.state;
|
|
|
|
|
|
|
|
|
|
let url = "/courses.json";
|
|
|
|
|
axios.post(url, {
|
|
|
|
|
course_list_name: values.course,
|
|
|
|
|