From cf657d44ee1b7b15b676005fc5684f69f9b2b9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 25 Dec 2019 15:00:02 +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 --- .../courses/coursesPublic/NewShixunModel.js | 37 +++++++++---------- .../paths/PathDetail/DetailCardsEditAndAdd.js | 1 + .../PathDetail/DetailCardsEditAndEdit.js | 1 + public/react/src/modules/tpm/TPMBanner.js | 9 +++-- .../modules/tpm/TPMsettings/Configuration.js | 9 +++-- .../src/modules/tpm/shixuns/ShixunCard.js | 4 +- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 1f7518a9d..f9318eb9d 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -25,23 +25,22 @@ class NewShixunModel extends Component{ } componentDidMount() { let{page,type,keyword,order,diff,limit,status,sort}=this.state; - let newsort=sort - if(this.props&&this.props.user.course_name===undefined){ - newsort="created_at"; - }else{ - newsort="publish_time"; - } - if(this.props.type==='shixuns'){ - this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,newsort); + this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,sort); }else{ this.getdatalist(page,type,undefined,keyword,order,undefined,limit,undefined,sort); } - } - getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sort)=>{ - + getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sorts)=>{ + let newsort=sorts; + if(this.props.type==="shixuns"&&type==="mine"){ + if(this.props&&this.props.user.course_name===undefined){ + newsort="created_at"; + }else{ + newsort="publish_time"; + } + } this.setState({ isspinning:true }) @@ -53,14 +52,14 @@ class NewShixunModel extends Component{ url="/subject_lists.json"; } axios.get(url,{params:{ - page, - type, - status, - keyword, - order, - diff, - limit, - sort + page:page, + type:type, + status:status, + keyword:keyword, + order:order, + diff:diff, + limit:limit, + sort:newsort }}).then((response) => { if(response.data){ if(pagetype===undefined){ diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 9a4b82fb3..c296899f2 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -502,6 +502,7 @@ class DetailCardsEditAndAdd extends Component{ diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js index 350c2eb8d..1a3fd3362 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js @@ -504,6 +504,7 @@ class DetailCardsEditAndEdit extends Component{ diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index fa8a4b222..ee8bfd740 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -1307,7 +1307,7 @@ class TPMBanner extends Component { } :"" } - {this.state.Radiovalue === 4 ?