修复:
1. 暂时关闭录音效果 2. 聊天加上了房间id的字段 已知bug: 1. 视频通话不成功
This commit is contained in:
@@ -48,6 +48,10 @@
|
|||||||
<div class="btn-ripple"></div>
|
<div class="btn-ripple"></div>
|
||||||
<div class="recording-wave" v-if="isRecording"></div>
|
<div class="recording-wave" v-if="isRecording"></div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 录音状态指示器 -->
|
||||||
|
<!-- <RecordingIndicator />-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表情选择器 -->
|
<!-- 表情选择器 -->
|
||||||
@@ -109,6 +113,7 @@ import { message } from 'ant-design-vue';
|
|||||||
import CustomTextarea from './CustomTextarea.vue';
|
import CustomTextarea from './CustomTextarea.vue';
|
||||||
import EmojiPicker from './EmojiPicker.vue';
|
import EmojiPicker from './EmojiPicker.vue';
|
||||||
import FileUploadPreview from './FileUploadPreview.vue';
|
import FileUploadPreview from './FileUploadPreview.vue';
|
||||||
|
import RecordingIndicator from "@/components/RecordingIndicator.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const chatStore = useChatStore();
|
const chatStore = useChatStore();
|
||||||
@@ -200,6 +205,7 @@ const sendTextMessage = async () => {
|
|||||||
await sendMessage({
|
await sendMessage({
|
||||||
senderId: userStore.currentUser.id,
|
senderId: userStore.currentUser.id,
|
||||||
receiverId: chatStore.currentFriend.id,
|
receiverId: chatStore.currentFriend.id,
|
||||||
|
roomId: chatStore.currentFriend.room_id,
|
||||||
type: messageType,
|
type: messageType,
|
||||||
content: messageContent
|
content: messageContent
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { inject } from 'vue';
|
import { inject } from 'vue';
|
||||||
|
import {useRecording} from "@/composables/useRecording.js";
|
||||||
|
|
||||||
const isRecording = inject('isRecording');
|
// 使用录音组合式函数
|
||||||
|
const { isRecording } = useRecording();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ export const sendMessage = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const requestData = {
|
const requestData = {
|
||||||
|
room_id: data.roomId,
|
||||||
sender_user_id: data.senderId,
|
sender_user_id: data.senderId,
|
||||||
receiver_user_id: data.receiverId,
|
receiver_user_id: data.receiverId,
|
||||||
message_type: messageTypeMap[data.type] || 0,
|
message_type: messageTypeMap[data.type] || 0,
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<!-- 连接状态指示器 -->
|
<!-- 连接状态指示器 -->
|
||||||
<ConnectionStatus />
|
<ConnectionStatus />
|
||||||
|
|
||||||
<!-- 录音状态指示器 -->
|
<!-- <!– 录音状态指示器 –>-->
|
||||||
<RecordingIndicator />
|
<!-- <RecordingIndicator />-->
|
||||||
|
|
||||||
<!-- 视频通话组件(移动到此处) -->
|
<!-- 视频通话组件(移动到此处) -->
|
||||||
<VideoCallComponent
|
<VideoCallComponent
|
||||||
@@ -84,7 +84,7 @@ const callerInfo = ref(null);
|
|||||||
const { connectWebSocket, disconnectWebSocket } = useWebSocket();
|
const { connectWebSocket, disconnectWebSocket } = useWebSocket();
|
||||||
|
|
||||||
// 初始化录音功能
|
// 初始化录音功能
|
||||||
const { isRecording } = useRecording();
|
// const { isRecording } = useRecording();
|
||||||
|
|
||||||
// 处理导航切换
|
// 处理导航切换
|
||||||
const handleNavChange = (nav) => {
|
const handleNavChange = (nav) => {
|
||||||
@@ -101,7 +101,6 @@ watch(() => chatStore.callStatus, (status) => {
|
|||||||
watch(() => chatStore.incomingCall, (call) => {
|
watch(() => chatStore.incomingCall, (call) => {
|
||||||
if (call) {
|
if (call) {
|
||||||
isIncoming.value = true;
|
isIncoming.value = true;
|
||||||
console.log(call, 'ssssssssssssssss')
|
|
||||||
callerInfo.value = chatStore.friends.find(f => f.id === call.callerId);
|
callerInfo.value = chatStore.friends.find(f => f.id === call.callerId);
|
||||||
callType.value = call.callType;
|
callType.value = call.callType;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default defineConfig({
|
|||||||
target: 'http://127.0.0.1:12080',
|
target: 'http://127.0.0.1:12080',
|
||||||
// target: 'https://g-ws.nailaoyun.cn',
|
// target: 'https://g-ws.nailaoyun.cn',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user