From 411f98297c38daa5e1f890a9e3556e6c90a11b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 15:46:27 +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 --- .../modules/courses/gradinforms/Eduinforms.js | 10 +++++----- .../modules/paths/PathDetail/PathDetailIndex.js | 17 ++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index f52471094..38190afaf 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -45,12 +45,12 @@ class Eduinforms extends Component{ this.setState({ dataquerys:{}, }); - return + }else { + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; } - this.setState({ - dataquerys:foqus, - }); - dataqueryss=foqus; }catch (e) { this.setState({ dataquerys:{}, diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index c04c74e87..50da053b2 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -146,6 +146,7 @@ class PathDetailIndex extends Component{ } componentDidMount(){ + debugger const query = this.props.location.search; // const type = query.split('?chinaoocTimestamp='); // console.log("Eduinforms12345"); @@ -158,18 +159,19 @@ class PathDetailIndex extends Component{ this.setState({ dataquerys:{}, }); - return + }else{ + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; } - this.setState({ - dataquerys:foqus, - }); - dataqueryss=foqus; }catch (e) { this.setState({ dataquerys:{}, }) } - this.getdatasindexs(undefined,dataqueryss) + debugger + this.getdatasindexs(undefined,dataqueryss); } //截取url 数据的 foo=(url)=> { @@ -194,6 +196,7 @@ class PathDetailIndex extends Component{ return json; } getdatasindexs=(key,yslwebobject)=>{ + debugger // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; @@ -252,7 +255,7 @@ class PathDetailIndex extends Component{ }) }; - getdatasindex=(key,yslwebobject)=>{ + getdatasindex=(key)=>{ // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json";