chore: 调整 WebSocket URL

This commit is contained in:
2024-06-05 21:24:29 +08:00
parent dc4ae0fb34
commit 98e8060bc7

View File

@@ -93,7 +93,7 @@ onBeforeUnmount(() => {
const unreadMessageCount = ref(0)
// 初始化 WebSocket
const initWebSocket = (token: string) => {
socket = new WebSocket(`${import.meta.env.VITE_API_WS_URL}/ws?token=${token}`)
socket = new WebSocket(`${import.meta.env.VITE_API_WS_URL}/websocket?token=${token}`)
socket.onopen = () => {
// console.log('WebSocket connection opened')
}