修复:

1. 重复请求
2. 后端接口问题修复

已知bug:
1. 交换信令问题
2. rtc未测试
This commit is contained in:
2025-07-08 16:43:09 +08:00
parent 5fe9c29d6e
commit 36bb210539
5 changed files with 704 additions and 132 deletions

View File

@@ -93,7 +93,8 @@ const handleNavChange = (nav) => {
// 监听通话状态变化
watch(() => chatStore.callStatus, (status) => {
showVideoCall.value = status !== 'idle';
// 只有当通话状态是活跃状态时才显示视频组件
showVideoCall.value = status === "connecting" || status === "calling" || status === "ringing" || status === "ongoing";
});
// 监听来电
@@ -113,6 +114,9 @@ watch(() => chatStore.currentCall, (call) => {
callerInfo.value = chatStore.friends.find(f => f.id === call.peerId);
callType.value = call.callType;
isIncoming.value = false;
} else {
// 当通话结束时重置状态
showVideoCall.value = false;
}
});
@@ -126,10 +130,11 @@ const handleRejectCall = () => {
chatStore.rejectCall();
};
// 处理结束通话
// 处理结束通话 - 修复挂断逻辑
const handleEndCall = () => {
chatStore.endCall();
};
// 加载主题
themeStore.loadTheme();
@@ -150,7 +155,6 @@ onUnmounted(() => {
disconnectWebSocket();
});
</script>
<style scoped>
@keyframes float {
0% { transform: translateY(0px) rotate(0deg); }