From 33a669a9403dac0a2919d207b81c0400f6f5e720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Mon, 6 Sep 2021 10:37:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC404=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 5 +++-- src/AppConfig.js | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index f0fe80b1..442d4f32 100644 --- a/src/App.js +++ b/src/App.js @@ -103,7 +103,7 @@ const CreateMerge = Loadable({ }) // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 -const keyWord = ["explore", "settings", "setting", "CCF", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search"]; +const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize"]; class App extends Component { constructor(props) { @@ -365,7 +365,7 @@ class App extends Component { return () } }> - : pathType === '404' ? : + : pathType === '404' ? : ( @@ -377,6 +377,7 @@ class App extends Component { } /> // + // } diff --git a/src/AppConfig.js b/src/AppConfig.js index 825a2a3b..ea85a4e5 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -11,9 +11,9 @@ broadcastChannelOnmessage('refreshPage', () => { }) function locationurl(list) { - // if (window.location.port !== "3007") { + if (window.location.port !== "3007") { window.location.href = list - // } + } } // TODO 开发期多个身份切换 let debugType = "" @@ -86,7 +86,7 @@ export function initAxiosInterceptors(props) { if (response.data.status === 404) { let responseURL = response.request ? response.request.responseURL:''; - if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 && responseURL.indexOf('/api/owners/') === -1) { + if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 ) { locationurl('/nopage'); } }