@@ -88,7 +88,10 @@ export function useSocketClient(roomId: string | null) {
const newSocket = io('/', {
path: '/socket.io',
transports: ['websocket'],
- query: { token },
+ withCredentials: true,
+ query: {
+ socket_token: token
+ },
reconnection: true,
reconnectionAttempts: 5,
reconnectionDelay: 1000,
@@ -31,7 +31,10 @@ export function useStockSocket(): StockSocketClient {
+ socket_token:token
@@ -173,7 +173,7 @@ export function StockMain() {
<div className="flex flex-col h-screen bg-gray-900">
{!isConnected && (
<div className="bg-yellow-600 text-white text-center py-1 text-sm">
- 正在尝试连接行情服务...
+ 正在尝试连接答题卡服务...
</div>
)}
{/* 顶部行情和收益信息 */}