From a24078f8ef498aa139cf8deef6a993b2aedfc19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 09:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 3 +- .../subroute/ecStudentList/EcStudentList.js | 33 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5f30a26a8..ca6df07ac 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -45,7 +45,8 @@ export function initAxiosInterceptors(props) { proxy="http://192.168.2.63:3001"; // wy - proxy="http://192.168.2.63:3001" + proxy="http://192.168.2.63:3001"; + proxy="https://test-newweb.educoder.net"; // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js index 312bfeecf..9b3147ac3 100644 --- a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js +++ b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js @@ -39,20 +39,25 @@ class EcStudentList extends Component { let major_id=this.props.match.params.major_id; let year_id=this.props.match.params.year_id; - const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data'; - axios.get(url, { - withCredentials: true, - }).then((response) => { - if(response.status===200){ - this.setState({ - majorschoollist:response.data, - ismanager:response.data.ismanager, - }) - } - }) - .catch(function (error) { - console.log(error); - }); + // const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data'; + // axios.get(url, { + // withCredentials: true, + // }).then((response) => { + // if(response){ + // if(response.status){ + // if(response.status===200){ + // this.setState({ + // majorschoollist:response.data, + // ismanager:response.data.ismanager, + // }) + // } + // } + // } + // + // }) + // .catch(function (error) { + // console.log(error); + // }); // let majorschoollist={ // ec_students: [{index: 1, student_name: "同意", student_id: "s20111458"}, // {index: 1, student_name: "同意", student_id: "s20111458"},