fix(websocket): 处理被踢出通知时跳转到登录页面
当收到"Kicked out"通知时,直接重定向到登录页面以强制用户重新登录
This commit is contained in:
@@ -46,6 +46,10 @@ const messageHandlers: Record<string, MessageHandler> = {
|
||||
CmdNotify: message => {
|
||||
console.log("通知消息", message);
|
||||
// 在这里添加具体的处理逻辑
|
||||
if (message.notify == "Kicked out") {
|
||||
// 被踢出时直接跳转到登录页面
|
||||
window.location.href = "/login";
|
||||
}
|
||||
},
|
||||
|
||||
// 可以继续添加更多处理器...
|
||||
|
||||
Reference in New Issue
Block a user