refactor: ♻️ stomp 连接管理器优化,添加指数退避重连策略,调整 WebSocket 服务的目录结构

This commit is contained in:
Ray.Hao
2025-04-25 18:39:26 +08:00
parent 152789001a
commit f3576d51f2
11 changed files with 287 additions and 202 deletions

View File

@@ -1,4 +1,4 @@
import { useWebSocketDict } from "@/hooks/useWebSocketDict";
import { useDictSync } from "@/hooks/websocket/services/useDictSync";
import { getAccessToken } from "@/utils/auth";
/**
@@ -19,7 +19,7 @@ export function setupWebSocket() {
try {
// 延迟初始化,确保应用完全启动
setTimeout(() => {
const dictWebSocket = useWebSocketDict();
const dictWebSocket = useDictSync();
// 初始化字典WebSocket服务
dictWebSocket.initWebSocket();