This commit is contained in:
yunkexin 2025-10-11 09:03:39 +08:00
parent bda1e10a92
commit c5828259f1
7 changed files with 40 additions and 14 deletions

View File

@ -90,7 +90,12 @@ const Sider = (props) => {
/** 回到首页 */
const navToHome = () => {
setActiveMenu(null);
props.history.push({ pathname: "/home" });
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000' ) {
props.history.replace('/grouphome')
}else{
props.history.replace('/home')
}
// props.history.push({ pathname: "/home" });
};
const navToLarge = () => {
setActiveMenu('largeScreen');

View File

@ -26,7 +26,13 @@ export default {
}
else
{
dispatch(routerRedux.push('/home'))
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
dispatch(routerRedux.replace('/grouphome'))
}else{
dispatch(routerRedux.replace('/home'))
}
}
}
})

View File

@ -155,7 +155,13 @@ export default {
window.location.replace(config.guideH5Host);
// dispatch(routerRedux.push("/HomeMobileNew"));
} else {
dispatch(routerRedux.push("/home"));
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
dispatch(routerRedux.replace('/grouphome'))
}else{
dispatch(routerRedux.replace('/home'))
}
}
// 新开 tab 页面,直接从 login 路径进来,则需要重新检查一下是否登录,未登录则执行登录获取到菜单以及必要数据
dispatch({

View File

@ -195,7 +195,12 @@ const Backend = (props) => {
const [collapsed, setCollapsed] = useState(false)
const navToHome = () => {
props.history.push({ pathname: '/home' })
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
props.history.replace('/grouphome')
}else{
props.history.replace('/home')
}
}
return (

View File

@ -207,10 +207,9 @@ class GroupHome extends React.Component {
}
componentDidMount() {
if (localStorage.getItem("webOrgId") !== '00300000-0000-0000-0000-000000000000') {
history.replace('/home')
// props.history.push({ pathname: "/grouphome" });
}
// if (localStorage.getItem("webOrgId") !== '00300000-0000-0000-0000-000000000000') {
// history.replace('/home')
// }
if (window.navigator.userAgent.indexOf("Windows") < 1) {
window.location.replace(config.guideH5Host);
openNotificationMobile("bottomRight");

View File

@ -214,11 +214,10 @@ class Home extends React.Component {
componentDidMount() {
this._isMounted = true; // 组件挂载时设为true
const currentPath = this.props.location.pathname;
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000' && currentPath !== '/grouphome') {
this.props.history.replace('/grouphome')
return
// props.history.push({ pathname: "/grouphome" });
}
// if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000' && currentPath !== '/grouphome') {
// this.props.history.replace('/grouphome')
// return
// }
if (window.navigator.userAgent.indexOf("Windows") < 1) {
window.location.replace(config.guideH5Host);
openNotificationMobile("bottomRight");

View File

@ -277,7 +277,13 @@ class LoginPage extends React.Component {
window.location.replace(config.guideH5Host)
// this.props.history.push({ pathname: '/HomeMobileNew' })
} else {
this.props.history.push({ pathname: '/home' })
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000' ) {
this.props.history.replace('/grouphome')
}else{
this.props.history.replace('/home')
}
}
}
})