Commit 415a7302 authored by 周宏民's avatar 周宏民

fix: 修改刷新时,没重定向登录页,造成tag多了一个刷新前的功能tag

parent 71d18457
Pipeline #89931 passed with stages
......@@ -64,16 +64,16 @@ class SecurityLayout extends React.Component {
const { children, global, loading } = this.props;
const tk = Cookies.get('token') || global.token;
const isLogin = tk !== null && tk !== 'undefined' && tk !== void 0;
if (isLogin && window.location.pathname !== `/civbase/industry` && !window.finishRender) {
if (window.globalConfig?.userInfo?.Groups && window.globalConfig?.Industry === '') {
return <Redirect to={{ pathname: `/industry`, state: { reload: true } }} exact />;
}
return <PageLoading />;
}
if (!isLogin && window.location.pathname !== '/civbase/user/login') {
const { pathname } = history.location;
if (
(!isLogin && window.location.pathname !== '/civbase/user/login') ||
// eslint-disable-next-line no-prototype-builtins
(global.hasOwnProperty('size') && global.size === 0)
) {
this.props.updateCurrentIndex && this.props.updateCurrentIndex(0);
let client = global.client || sessionStorage.getItem('client');
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city';
client = client || 'city';
let { generateType } = global;
generateType =
!_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined'
......
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