refactor: ♻️ 用户信息不再本地持久化,改为内存态:刷新页面后需要重新请求用户信息
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ref, onMounted, onUnmounted, watch, getCurrentInstance } from "vue";
|
||||
import { useStomp } from "./useStomp";
|
||||
import { registerWebSocketInstance } from "@/plugins/websocket";
|
||||
import { Auth } from "@/utils/auth";
|
||||
import { AuthStorage } from "@/utils/auth";
|
||||
|
||||
// 全局单例实例
|
||||
let globalInstance: ReturnType<typeof createOnlineCountHook> | null = null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Client, type IMessage, type StompSubscription } from "@stomp/stompjs";
|
||||
import { Auth } from "@/utils/auth";
|
||||
import { AuthStorage } from "@/utils/auth";
|
||||
|
||||
export interface UseStompOptions {
|
||||
/** WebSocket 地址,不传时使用 VITE_APP_WS_ENDPOINT 环境变量 */
|
||||
|
||||
Reference in New Issue
Block a user