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

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

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