Commit 49fea5bc authored by shenshaokai's avatar shenshaokai

fix: 登录过期自动移除菜单权限

parent 947afca4
......@@ -3,7 +3,7 @@ import responseCode from '@/constants/responseCode'
import { IRequestError, IRequestSuccess } from '..';
import { getIntl, getLocale } from 'umi'
import { message } from 'antd'
import { getCookieAuth, removeAuth } from './auth';
import { getCookieAuth, removeAuth, onRemoveMenuData } from './auth';
import { GlobalConfig } from '@/global/config';
import qs from 'qs'
import { getCookie } from './cookie';
......@@ -135,6 +135,7 @@ class ApiRequest {
// 登录验证
if (res.code === 1101) {
removeAuth()
onRemoveMenuData()
// SpaLogout()
window.location.replace(`/user/login?redirect=${btoa(encodeURIComponent(String(window.location)))}`)
message.destroy()
......
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