1
This commit is contained in:
@@ -117,6 +117,7 @@ if (!res.ok) {
|
||||
// 检测"被踢出"错误 — 单设备登录互斥
|
||||
if (res.status === 401 && typeof parsed?.detail === 'string' && parsed.detail.includes('其他设备登录')) {
|
||||
window.dispatchEvent(new CustomEvent('kicked-out', { detail: { message: parsed.detail } }));
|
||||
throw new Error(parsed.detail); // 阻止后续自动跳转,由通知按钮处理
|
||||
}
|
||||
if (res.status === 401 && !options.skipAuthRedirect) {
|
||||
clearToken();
|
||||
|
||||
Reference in New Issue
Block a user