From aefe7a8fa2813d4a34a706e1e63e389a94c6a78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 23 Jul 2019 12:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 28 +++++++++++-------- public/react/src/modules/tpm/NewHeader.js | 8 +++--- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index eb1627e83..a8f50b030 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -290,11 +290,13 @@ class CoursesNew extends Component { search:value }).then((result)=>{ // console.log(result.data) - this.setState({ - searchlist:result.data.course_lists, - // course:value, - fetching:false - }) + if (response.data.message===undefined) { + this.setState({ + searchlist: result.data.course_lists, + // course:value, + fetching: false + }) + } // this.props.form.setFieldsValue({ // course:value // }) @@ -343,13 +345,15 @@ class CoursesNew extends Component { search: value } }).then((result)=>{ - this.setState({ - searchlistscholl:result.data.school_names, - scholl:value - }) - this.props.form.setFieldsValue({ - scholl:value - }) + if (response.data.message===undefined) { + this.setState({ + searchlistscholl: result.data.school_names, + scholl: value + }) + this.props.form.setFieldsValue({ + scholl: value + }) + } }).catch((error)=>{ console.log(error) }) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 8e48e8b0d..28de997cd 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -534,10 +534,10 @@ submittojoinclass=(value)=>{