diff --git a/src/forge/Component/SiderBar.js b/src/forge/Component/SiderBar.js index 8d42c68a1..c537b7a0d 100644 --- a/src/forge/Component/SiderBar.js +++ b/src/forge/Component/SiderBar.js @@ -29,6 +29,7 @@ function SiderBar(props) { const [ feedBackModal, setFeedBackModal] = useState(false); const [ feedBackValue, setFeedBackValue] = useState(undefined); const [ failApply, setFailApply] = useState(undefined); + console.log(props); useEffect(()=>{ user && setLogin(user.login); @@ -104,6 +105,9 @@ function SiderBar(props) { } function loginAi(){ + if(!user.login){ + return props.showLoginDialog(); + } const url = `https://testai.trustie.net/login`; const regurl = `https://testai.trustie.net/register`; axios.post(regurl,{username:user.login,password:"12345678"}).then(res=>{ @@ -119,7 +123,7 @@ function SiderBar(props) { return (
{/* 超算智能助手 */} - { location.pathname === "/zone/NSCC" && user && user.login && + { location.pathname.indexOf("/zone/NSCC")>-1 &&
diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 6b463218f..8d4fd5e3f 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -299,7 +299,7 @@ export function TPMIndexHOC(WrappedComponent) { let notFullPage = !path.includes('softwareFactory') return (
- {(!path || (path && !path.includes('glcc') )) && } + {(!path || (path && !path.includes('glcc') )) && }