feat:权限管理-登出,前台打印登出的原因(提示用户因权限修改而登出),由于跳转login page 的原因,http的弹框会被跳转移除,所有利用session传到login page 抓出来弹框出效果
This commit is contained in:
@ -80,6 +80,19 @@ const transform: AxiosTransform = {
|
||||
switch (code) {
|
||||
case ResultEnum.UNAUTHRAZATION:
|
||||
timeoutMsg = t('登录超时,请重新登录!');
|
||||
|
||||
if (data) {
|
||||
let split = data.split('||');
|
||||
if (split.length > 1) {
|
||||
let logoutMessage = split[1];
|
||||
// 跨页面配置 异常显示提醒
|
||||
sessionStorage.setItem('logoutInfoData', JSON.stringify({
|
||||
logoutType: split[0],
|
||||
logoutMessage: logoutMessage,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
const userStore = useUserStoreWithOut();
|
||||
userStore.setToken(undefined);
|
||||
if (!window.location.hash.includes('login')&&!window.location.pathname.includes('login')
|
||||
|
||||
Reference in New Issue
Block a user