From 24a80a94ddffdaae8600c7ca1ff36d271bdd3c9a Mon Sep 17 00:00:00 2001 From: lq Date: Thu, 17 Jul 2025 13:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201.=20=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E5=85=B3=E9=97=AD=E5=BD=95=E9=9F=B3=E6=95=88=E6=9E=9C?= =?UTF-8?q?=202.=20=E8=81=8A=E5=A4=A9=E5=8A=A0=E4=B8=8A=E4=BA=86=E6=88=BF?= =?UTF-8?q?=E9=97=B4id=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已知bug: 1. 视频通话不成功 --- src/components/MessageInput.vue | 6 ++++++ src/components/RecordingIndicator.vue | 4 +++- src/utils/request.js | 1 + src/views/Chat.vue | 7 +++---- vite.config.js | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/MessageInput.vue b/src/components/MessageInput.vue index adb05a2..377b92c 100644 --- a/src/components/MessageInput.vue +++ b/src/components/MessageInput.vue @@ -48,6 +48,10 @@
+ + + + @@ -109,6 +113,7 @@ import { message } from 'ant-design-vue'; import CustomTextarea from './CustomTextarea.vue'; import EmojiPicker from './EmojiPicker.vue'; import FileUploadPreview from './FileUploadPreview.vue'; +import RecordingIndicator from "@/components/RecordingIndicator.vue"; const userStore = useUserStore(); const chatStore = useChatStore(); @@ -200,6 +205,7 @@ const sendTextMessage = async () => { await sendMessage({ senderId: userStore.currentUser.id, receiverId: chatStore.currentFriend.id, + roomId: chatStore.currentFriend.room_id, type: messageType, content: messageContent }); diff --git a/src/components/RecordingIndicator.vue b/src/components/RecordingIndicator.vue index 77cb67f..32c0fe4 100644 --- a/src/components/RecordingIndicator.vue +++ b/src/components/RecordingIndicator.vue @@ -12,6 +12,8 @@ diff --git a/src/utils/request.js b/src/utils/request.js index 6b99e33..6cf8ed3 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -125,6 +125,7 @@ export const sendMessage = (data) => { } const requestData = { + room_id: data.roomId, sender_user_id: data.senderId, receiver_user_id: data.receiverId, message_type: messageTypeMap[data.type] || 0, diff --git a/src/views/Chat.vue b/src/views/Chat.vue index bc0119b..276d5e4 100644 --- a/src/views/Chat.vue +++ b/src/views/Chat.vue @@ -10,8 +10,8 @@ - - + + { @@ -101,7 +101,6 @@ watch(() => chatStore.callStatus, (status) => { watch(() => chatStore.incomingCall, (call) => { if (call) { isIncoming.value = true; - console.log(call, 'ssssssssssssssss') callerInfo.value = chatStore.friends.find(f => f.id === call.callerId); callType.value = call.callType; } else { diff --git a/vite.config.js b/vite.config.js index 8439d0f..38826bd 100644 --- a/vite.config.js +++ b/vite.config.js @@ -22,7 +22,7 @@ export default defineConfig({ target: 'http://127.0.0.1:12080', // target: 'https://g-ws.nailaoyun.cn', changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '') + // rewrite: (path) => path.replace(/^\/api/, '') } } },