Commit 058fecbd authored by 杨思琦's avatar 杨思琦

fix: 修复首次白屏问题

parent 61d031e2
Pipeline #65369 passed with stages
...@@ -276,14 +276,14 @@ const Layout = props => { ...@@ -276,14 +276,14 @@ const Layout = props => {
const tk = Cookies.get('token') || props.global.token; const tk = Cookies.get('token') || props.global.token;
const isLogin = tk !== null && tk !== 'undefined' && tk !== void 0; const isLogin = tk !== null && tk !== 'undefined' && tk !== void 0;
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';
// 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.replace(`/user/login?client=${client}${generateType}`);
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