diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 02d8c2be5..0666aadc3 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -18,10 +18,9 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType ="" -// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' -// window._debugType = debugType; +const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : + window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' +window._debugType = debugType; export function initAxiosInterceptors(props) { // TODO 避免重复的请求 https://github.com/axios/axios#cancellation diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 1183b59e9..eb52a32f5 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -135,6 +135,8 @@ class CoursesNew extends Component { let {is_public,datatime} = this.state // console.log(is_public) + debugger + if (coursesId != undefined) { // 编辑 @@ -180,7 +182,7 @@ class CoursesNew extends Component { name: values.classroom, class_period: values.period, credit: parseFloat(values.credit), - end_date: datatime, + end_date: datatime===undefined?"":datatime, is_public: is_public === true || is_public === 1 ? 1 : 0, course_module_types: values.checkboxgroup, authentication: this.state.Realnamecertification, @@ -234,7 +236,7 @@ class CoursesNew extends Component { name: values.classroom, class_period: values.period, credit: parseFloat(values.credit), - end_date: datatime, + end_date: datatime===undefined?"":datatime, is_public: is_public === true || is_public === 1 ? 1 : 0, course_module_types: values.checkboxgroup, authentication: this.state.Realnamecertification,