智能助手点击登录+超算所有页面都显示
This commit is contained in:
parent
c9c9bac022
commit
5dfef69aeb
|
|
@ -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 (
|
||||
<div className={"-task-sidebar"} >
|
||||
{/* 超算智能助手 */}
|
||||
{ location.pathname === "/zone/NSCC" && user && user.login &&
|
||||
{ location.pathname.indexOf("/zone/NSCC")>-1 &&
|
||||
<Tooltip title="智能助手" placement={"left"} overlayClassName="tooltipBox">
|
||||
<div className="consult" onClick={loginAi} style={{cursor: 'pointer'}}>
|
||||
<i className="iconfont icon-zhinengzhushou font-34" ></i>
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
let notFullPage = !path.includes('softwareFactory')
|
||||
return (
|
||||
<div className="indexHOC">
|
||||
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state}/>}
|
||||
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state} {...common}/>}
|
||||
<SystemNotice
|
||||
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
|
||||
history={this.props.history}
|
||||
|
|
|
|||
Loading…
Reference in New Issue