From 5dfef69aeb6357e29402f60b8518702bb1fdd990 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 16 Jun 2026 14:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=8A=A9=E6=89=8B=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=99=BB=E5=BD=95+=E8=B6=85=E7=AE=97=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=A1=B5=E9=9D=A2=E9=83=BD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/SiderBar.js | 6 +++++- src/modules/tpm/TPMIndexHOC.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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') )) && }