供应链未登录访问

This commit is contained in:
谢思 2026-03-12 14:32:58 +08:00
parent 28ad78af44
commit 2c40557c3d
2 changed files with 8 additions and 7 deletions

View File

@ -438,12 +438,13 @@ class NewHeader extends Component {
style={{display:!is_hidden ? 'flex' : 'none'} }
>
<a onClick={()=>{
if(current_user && !current_user.login){
this.props.showLoginDialog();
}else{
// current_user && window.open(`${item.link}?token=${current_user.admin ? "admin123" : current_user.user_id}`)
current_user && window.open(`${item.link}`)
}
window.open(`${item.link}`)
// if(current_user && !current_user.login){
// this.props.showLoginDialog();
// }else{
// // current_user && window.open(`${item.link}?token=${current_user.admin ? "admin123" : current_user.user_id}`)
// current_user && window.open(`${item.link}`)
// }
}}>{item.name}</a>
</li>
)

View File

@ -12,7 +12,7 @@ function Sbom(props) {
document.title = '供应链监测预警平台';
}, [])
const url = `${governance}/governancePortal/governance/home?uid=${user_id}`
const url = `${governance}/governancePortal/governance/home?uid=${user_id === 2 ? undefined : user_id}`
// const url = "http://localhost:3007/"
return <div className="" style={{border: "none"}}>