diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index b458c931a..227deb177 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -354,19 +354,22 @@ export function TPMIndexHOC(WrappedComponent) { } hideNavPath = (path) => { - const hidePath = ['/statistics', '/projects', '/notice', '/organizes', ''] + const hideUserPath = ['/statistics', '/projects', '/notice', '/organizes', ''] + const hidePath = ['/nopage', '/403', '/500', '/organize/new', '/settings/profile'] let hide = false const {current_user} = this.state; - hidePath.forEach(e => { + hideUserPath.forEach(e => { if (path === `/${current_user && current_user.login}${e}`) { hide = true } }) + hidePath.forEach(e => { + if (path === e) { + hide = true + } + }) // 组织页不要 if (this.props.pathType === 'Organization') hide = true - if (path === `/organize/new`) hide = true - // 设置页不要 - if (path === `/settings/profile`) hide = true return hide }