wip: 🚧 通知公告重构临时提交

This commit is contained in:
ray
2024-09-27 08:40:00 +08:00
parent 060fe452a2
commit b797acbb49
17 changed files with 340 additions and 367 deletions

View File

@@ -107,7 +107,7 @@
import { Client } from "@stomp/stompjs";
import { useUserStoreHook } from "@/store/modules/user";
import { TOKEN_KEY } from "@/enums/CacheEnum";
import { getToken } from "@/utils/auth";
const userStore = useUserStoreHook();
const isConnected = ref(false);
@@ -141,7 +141,7 @@ function connectWebSocket() {
stompClient = new Client({
brokerURL: socketEndpoint.value,
connectHeaders: {
Authorization: localStorage.getItem(TOKEN_KEY) || "",
Authorization: getToken(),
},
debug: (str) => {
console.log(str);