Commit 165cb394 authored by 杨思琦's avatar 杨思琦

fix: 修复首次退出网关丢失

parent 316cbe70
Pipeline #71173 waiting for manual action with stages
...@@ -280,12 +280,13 @@ const Layout = props => { ...@@ -280,12 +280,13 @@ const Layout = props => {
if (!isLogin) { if (!isLogin) {
let client = props?.global?.client || sessionStorage.getItem('client') || null; let client = props?.global?.client || sessionStorage.getItem('client') || null;
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city'; client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city';
// eslint-disable-next-line no-prototype-builtins
let generateType = props.global && props.global.hasOwnProperty('get') ? props.global.get('generateType') : null; let generateType = props.global && props.global.hasOwnProperty('get') ? props.global.get('generateType') : null;
generateType = generateType =
!_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined'
? `&generateType=${generateType}` ? `&generateType=${generateType}`
: ''; : '';
history.replace(`/user/login?client=${client}${generateType}`); history.push(`/user/login?client=${client}${generateType}`, { reload: true });
props.logout(); props.logout();
} }
}, [history, props, props.global, siteAction]); }, [history, props, props.global, siteAction]);
......
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