修复:

1. 暂时关闭录音效果
2. 聊天加上了房间id的字段

已知bug:
1. 视频通话不成功
This commit is contained in:
2025-07-17 13:50:12 +08:00
parent 5ef233de6d
commit 24a80a94dd
5 changed files with 14 additions and 6 deletions

View File

@@ -48,6 +48,10 @@
<div class="btn-ripple"></div>
<div class="recording-wave" v-if="isRecording"></div>
</button>
<!-- 录音状态指示器 -->
<!-- <RecordingIndicator />-->
</div>
<!-- 表情选择器 -->
@@ -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
});

View File

@@ -12,6 +12,8 @@
<script setup>
import { inject } from 'vue';
import {useRecording} from "@/composables/useRecording.js";
const isRecording = inject('isRecording');
// 使用录音组合式函数
const { isRecording } = useRecording();
</script>

View File

@@ -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,

View File

@@ -10,8 +10,8 @@
<!-- 连接状态指示器 -->
<ConnectionStatus />
<!-- 录音状态指示器 -->
<RecordingIndicator />
<!-- &lt;!&ndash; 录音状态指示器 &ndash;&gt;-->
<!-- <RecordingIndicator />-->
<!-- 视频通话组件移动到此处 -->
<VideoCallComponent
@@ -84,7 +84,7 @@ const callerInfo = ref(null);
const { connectWebSocket, disconnectWebSocket } = useWebSocket();
// 初始化录音功能
const { isRecording } = useRecording();
// const { isRecording } = useRecording();
// 处理导航切换
const handleNavChange = (nav) => {
@@ -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 {

View File

@@ -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/, '')
}
}
},