From f5a85e38f72c73a2f57319769ba2c5df19030096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 16 Aug 2019 14:53:06 +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 --- .../paths/PathDetail/PathDetailIndex.js | 25 ++++++++++- .../react/src/modules/paths/ShixunPathCard.js | 43 ++++++++++--------- 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 53eb566e6..98ae10a51 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -157,13 +157,36 @@ class PathDetailIndex extends Component{ if(result.data.allow_visit===true){ this.setState({ detailInfoList:result.data, - items: getItems(result.data.members.length), + // items: getItems(result.data.members.length), }) } }).catch((error)=>{ console.log(error); }) + + + let righturl="/paths/"+pathid+"right_banner.json"; + axios.get(righturl).then((result)=>{ + if (result.data.status === 407 || result.data.status === 401) { + debugger + return; + } + + if (result.data.status === 403) { + debugger + // window.location.href = "/403"; + return; + } + + this.setState({ + // detailInfoList:result.data, + items: getItems(result.data.members.length), + }) + + }).catch((error)=>{ + console.log(error); + }) } updatadetailInfoList=()=>{ diff --git a/public/react/src/modules/paths/ShixunPathCard.js b/public/react/src/modules/paths/ShixunPathCard.js index 416cef28a..f4fb61776 100644 --- a/public/react/src/modules/paths/ShixunPathCard.js +++ b/public/react/src/modules/paths/ShixunPathCard.js @@ -22,25 +22,7 @@ class ShixunPathCard extends Component{ return(