Merge branch 'master' of https://git.code.tencent.com/lian-cbtc/jl-client
This commit is contained in:
commit
adbb7c3d8d
@ -3,7 +3,7 @@ import store from '@/store';
|
||||
import router from './router';
|
||||
import NProgress from 'nprogress';
|
||||
import { admin} from './router';
|
||||
import { getToken} from '@/utils/auth';
|
||||
import { getToken, removeToken} from '@/utils/auth';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
@ -43,12 +43,20 @@ function getRouteInfo(to) {
|
||||
} else if (isDesignPage(toRoutePath)) {
|
||||
loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
const current_session = getSessionStorage('project');
|
||||
if (current_session && !current_session.startsWith('design')) {
|
||||
removeToken();
|
||||
}
|
||||
} else if ( /^\/xty/.test(toRoutePath)) {
|
||||
loginPath = loginXtyPage;
|
||||
clientId = null;
|
||||
} else {
|
||||
loginPath = getSessionStorage('project') === 'xty' ? loginXtyPage : loginPage;
|
||||
clientId = null;
|
||||
const current_session = getSessionStorage('project');
|
||||
if (current_session && current_session.startsWith('design')) {
|
||||
removeToken();
|
||||
}
|
||||
}
|
||||
|
||||
return { clientId, loginPath };
|
||||
|
Loading…
Reference in New Issue
Block a user