diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 149f9bc27..6e996297b 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -46,7 +46,8 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId;
let user_school=this.props.current_user&&this.props.current_user.user_school;
-
+ this.getschool("")
+ this.Searchvalue("")
if (coursesId != undefined) {
let url = "/courses/" + coursesId + "/settings.json"
axios.get(url).then((result) => {
@@ -85,8 +86,7 @@ class CoursesNew extends Component {
})
}
- this.getschool("")
- this.Searchvalue("")
+
}
componentDidUpdate(prevProps){
@@ -152,7 +152,7 @@ class CoursesNew extends Component {
}
if(values.school===""||values.school===undefined){
- this.scrollToAnchor("isschool")
+ // this.scrollToAnchor("isschool")
return
}
@@ -220,7 +220,7 @@ class CoursesNew extends Component {
return
}
if(values.school===""||values.school===undefined){
- this.scrollToAnchor("isschool")
+ // this.scrollToAnchor("isschool")
return
}
@@ -292,7 +292,8 @@ class CoursesNew extends Component {
search:value
}).then((result)=>{
// console.log(result.data)
- if (result.data.status===0) {
+ if (result.data.message===undefined) {
+
this.setState({
searchlist: result.data.course_lists,
// course:value,
@@ -357,7 +358,9 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
-
+ this.props.form.setFieldsValue({
+ school: value
+ })
let url="/schools/school_list.json";
axios.get(url,{
params: {
@@ -369,9 +372,7 @@ class CoursesNew extends Component {
searchlistscholl: result.data.school_names,
school: value
})
- this.props.form.setFieldsValue({
- school: value
- })
+
}
}).catch((error)=>{
console.log(error)
@@ -389,7 +390,7 @@ class CoursesNew extends Component {
const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => );
// console.log(this.props.current_user.user_school)
// form合并了
- // console.log(optionschool)
+ console.log(options)
return (