加载修正

This commit is contained in:
2025-12-30 10:47:19 +08:00
parent d0f133613d
commit 2c32072fa9

View File

@@ -189,7 +189,7 @@ import { Client } from '@stomp/stompjs'
// WebSocket配置 (通过Nginx代理访问网关再到workcase服务) // WebSocket配置 (通过Nginx代理访问网关再到workcase服务)
// SockJS URL (http://) // SockJS URL (http://)
const getWsUrl = () => { const getWsUrl = () => {
const token = JSON.parse(localStorage.getItem('token') || '').value || '' const token = localStorage.getItem('token')!
const protocol = window.location.protocol const protocol = window.location.protocol
const host = window.location.host const host = window.location.host
return `${protocol}//${host}/api/urban-lifeline/workcase/ws/chat-sockjs?token=${encodeURIComponent(token)}` return `${protocol}//${host}/api/urban-lifeline/workcase/ws/chat-sockjs?token=${encodeURIComponent(token)}`