Commit ae104835 authored by 杨思琦's avatar 杨思琦

fix: 登录修改

parent db6e7a5a
Pipeline #79942 passed with stages
......@@ -199,6 +199,7 @@ export function logout(data) {
window.globalConfig.hasGateWay = false;
window.globalConfig.userInfo = null;
window.qiankunIsCache = null;
window.qiankunStarted = false;
// window.globalConfig.hasGateWay = ;
}
......
......@@ -24,7 +24,7 @@ import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defau
import { actionCreators } from '@/containers/App/store';
import Icon, { LoadingOutlined } from '@ant-design/icons';
import BasicLayout from '@wisdom-utils/components/lib/layout/BasicLayout';
import { useHistory, useLocation } from '@wisdom-utils/runtime';
import { useHistory, useLocation, useAliveController } from '@wisdom-utils/runtime';
import { helpers, store, event } from '@wisdom-utils/utils';
import { Storeage as Store } from '@wisdom-utils/utils/lib/helpers';
import { defaultApp } from '@/micro';
......@@ -248,6 +248,7 @@ const pickRoutes = memoized((routes, pathname, locale) => {
});
const Layout = props => {
const { clear } = useAliveController();
const currentProduct = `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams(
'client',
) ||
......@@ -312,6 +313,7 @@ const Layout = props => {
: '';
if (!isLogin) {
history.push(`/user/login?client=${client}${generateType}`, { reload: true });
clear();
props.logout();
}
store.on('event:unauthorized', () => {
......@@ -328,6 +330,7 @@ const Layout = props => {
notification.close(key);
setTimeout(() => {
history.push(`/user/login?client=${client}${generateType}`, { reload: true });
clear();
props.logout();
})
}}>确认
......@@ -340,7 +343,7 @@ const Layout = props => {
return () => {
store.off('event:unauthorized');
};
}, [history, prefixCls, props, props.global, siteAction]);
}, [clear, history, prefixCls, props, props.global, siteAction]);
useEffect(() => {
if (
......@@ -404,7 +407,7 @@ const Layout = props => {
window.share.event.removeAllListeners('updateSite');
loginAction.events.removeListener('toggleIndustry', handleToggleIndustry);
};
}, [loginAction.events, props]);
}, [GetIntegrationConfig, loginAction.events, props]);
useEffect(() => {
const needMark = () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment