Commit ae4a239f by Apple\Apple

🐛fix(session): The localStorage did not clear user information after the login session expired

parent 3b0d4c84
......@@ -95,6 +95,8 @@ export function showError(error) {
if (error.name === 'AxiosError') {
switch (error.response.status) {
case 401:
// 清除用户状态
localStorage.removeItem('user');
// toast.error('错误:未登录或登录已过期,请重新登录!', showErrorOptions);
window.location.href = '/login?expired=true';
break;
......
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 sign in to comment