优化处理
This commit is contained in:
@@ -207,9 +207,9 @@ export class StompWebSocketService {
|
||||
console.log('📤 准备发送的聊天请求:', chatRequest)
|
||||
|
||||
try {
|
||||
// 发送到后端的/app/chat.send端点
|
||||
// 发送到后端的/app/chat/send端点(对应 @MessageMapping("/chat") + @MessageMapping("/send"))
|
||||
this.client.publish({
|
||||
destination: '/app/chat.send',
|
||||
destination: '/app/chat/send',
|
||||
body: JSON.stringify(chatRequest)
|
||||
})
|
||||
console.log('✅ STOMP聊天消息发送成功:', chatRequest)
|
||||
@@ -324,7 +324,7 @@ export class StompWebSocketService {
|
||||
|
||||
try {
|
||||
this.client.publish({
|
||||
destination: '/app/chat.connect',
|
||||
destination: '/app/chat/connect',
|
||||
body: JSON.stringify(connectRequest)
|
||||
})
|
||||
console.log('✅ STOMP连接消息发送成功:', connectRequest)
|
||||
|
||||
Reference in New Issue
Block a user