修复:
1. 暂时关闭录音效果 2. 聊天加上了房间id的字段 已知bug: 1. 视频通话不成功
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
import {useRecording} from "@/composables/useRecording.js";
|
||||
|
||||
const isRecording = inject('isRecording');
|
||||
// 使用录音组合式函数
|
||||
const { isRecording } = useRecording();
|
||||
</script>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<!-- 连接状态指示器 -->
|
||||
<ConnectionStatus />
|
||||
|
||||
<!-- 录音状态指示器 -->
|
||||
<RecordingIndicator />
|
||||
<!-- <!– 录音状态指示器 –>-->
|
||||
<!-- <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 {
|
||||
|
||||
Reference in New Issue
Block a user