Sfoglia il codice sorgente

修复编译报错

lxylxy123321 2 giorni fa
parent
commit
8f06983cfe
1 ha cambiato i file con 0 aggiunte e 3 eliminazioni
  1. 0 3
      frontend/src/api/websocket.ts

+ 0 - 3
frontend/src/api/websocket.ts

@@ -2,7 +2,6 @@ class WSManager {
   private ws: WebSocket | null = null
   private handlers: Map<string, Set<(msg: Record<string, unknown>) => void>> = new Map()
   private reconnectTimer: ReturnType<typeof setTimeout> | null = null
-  private url: string | null = null
 
   connect(baseUrl?: string) {
     if (this.ws) return
@@ -15,8 +14,6 @@ class WSManager {
       wsUrl += wsUrl.includes('?') ? '&' : '?'
       wsUrl += `token=${encodeURIComponent(token)}`
     }
-    this.url = wsUrl
-
     try {
       this.ws = new WebSocket(wsUrl)
     } catch {