diff --git a/src/AppConfig.js b/src/AppConfig.js index aa966b8b7..381ce19ac 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 = "" @@ -85,7 +85,7 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 404) { - let responseURL = response.data.request ? response.data.request.responseURL:''; + let responseURL = response.request ? response.request.responseURL:''; if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1) { locationurl('/nopage'); } diff --git a/src/forge/users/Index.jsx b/src/forge/users/Index.jsx index 8737e5caa..c1438d824 100644 --- a/src/forge/users/Index.jsx +++ b/src/forge/users/Index.jsx @@ -17,78 +17,19 @@ const Projects = Loadable({ }) export default withRouter( (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props) => { + console.log(props.location.pathname); + let secondRouter = ''; + if (props.location.pathname) { + secondRouter = props.location.pathname.split('/')[2]; + } + let userRouterArr = ['statistics', 'projects', 'notice', 'devops', 'organizes', 'info', 'watchers', 'fan_users', 'password']; return ( - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - ( - - )} - > - - { - return () - } - }> - - ( - + secondRouter && (!userRouterArr.includes(secondRouter)) ? + : )} >