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

fix: 登录修改

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