fix: 修复在线问题
This commit is contained in:
@@ -84,7 +84,7 @@ import useUserStore from "@/stores/user.js";
|
|||||||
import useConfigStore from "@/stores/config";
|
import useConfigStore from "@/stores/config";
|
||||||
import useAuths from "@/hooks/useAuths";
|
import useAuths from "@/hooks/useAuths";
|
||||||
import { Session } from "@/utils/storage";
|
import { Session } from "@/utils/storage";
|
||||||
import signalR from "@/utils/signalR";
|
// import signalR from "@/utils/signalR";
|
||||||
|
|
||||||
const { getToken, clearStorage } = useAuths();
|
const { getToken, clearStorage } = useAuths();
|
||||||
const configStore = useConfigStore();
|
const configStore = useConfigStore();
|
||||||
@@ -104,7 +104,7 @@ const logout = async () => {
|
|||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
//异步
|
//异步
|
||||||
await userStore.logOut();
|
await userStore.logOut();
|
||||||
await signalR.close();
|
// await signalR.close();
|
||||||
//删除成功后,跳转到主页
|
//删除成功后,跳转到主页
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export default {
|
|||||||
connection.state === signalR.HubConnectionState.Disconnected
|
connection.state === signalR.HubConnectionState.Disconnected
|
||||||
);
|
);
|
||||||
// 建议用户重新刷新浏览器
|
// 建议用户重新刷新浏览器
|
||||||
|
await this.close();
|
||||||
await this.start();
|
await this.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user