From 946cff6c52d1e4285fdaa77855bdf453ec28f3e7 Mon Sep 17 00:00:00 2001
From: cc <824295981@qq.com>
Date: Fri, 6 Feb 2026 17:56:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9F=B3=E8=A7=86=E9=A2=91?=
=?UTF-8?q?=E9=80=9A=E8=AF=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TUIKit/components/TUIChat/index.vue | 19 +-
.../message-input-toolbar/call-view/index.vue | 36 ++-
pages/room/incom.vue | 229 +++++++++---------
pages/room/room.nvue | 46 ++--
stores/user.js | 40 +++
5 files changed, 208 insertions(+), 162 deletions(-)
diff --git a/TUIKit/components/TUIChat/index.vue b/TUIKit/components/TUIChat/index.vue
index 4309898..ac63c1f 100644
--- a/TUIKit/components/TUIChat/index.vue
+++ b/TUIKit/components/TUIChat/index.vue
@@ -361,23 +361,8 @@
)
currentConversationID.value = conversationID
}
-
- // #ifdef APP-PLUS
- CallLib.init({})
- CallLib.onCallReceived(res => {
- console.log(
- 'Engine:OnCallReceived=>' + '监听通话呼入, 目标id=>',
- res.data
- )
- if (res.data.targetId) {
- navigateTo('/pages/room/incom', {
- type: res.data.extra,
- userID: res.data.targetId
- })
- }
- })
-
- // #endif
+
+
diff --git a/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue b/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue
index d7ca097..3379516 100644
--- a/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue
+++ b/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue
@@ -6,6 +6,11 @@
import { computed, ref } from 'vue'
import { type IConversationModel } from '@tencentcloud/chat-uikit-engine-lite'
import { navigateTo } from '../../../../../utils/router'
+ import TUIChatEngine, {
+ TUIConversationService,
+ TUIFriendService,
+ TUIChatService
+ } from '@tencentcloud/chat-uikit-engine-lite'
const props = withDefaults(
defineProps<{
@@ -39,11 +44,34 @@
emits('onDialogPopupShowOrHide', true)
if (isType.value) {
- navigateTo('/pages/room/incom', {
- type: 'call',
- userID: data.userID
- })
+ let params ={
+ to: props.currentConversation.conversationID,
+ conversationType: TUIChatEngine.TYPES.CONV_C2C,
+ payload: {
+ text: "拨打语音"
+ }
+ }
+ console.log('params: ',params);
+ // TUIChatService.sendTextMessage(params)
+ navigateTo('/pages/room/incom', {
+ type: 'call',
+ userID: data.userID
+ })
} else {
+ let params ={
+ to: props.currentConversation.conversationID,
+ conversationType: TUIChatEngine.TYPES.CONV_C2C,
+ payload: {
+ text: "拨打视频"
+ }
+ }
+ // TUIChatService.sendTextMessage(params)
+ uni.setStorageSync('room-parameters', {
+ callType: 'out',
+ mediaType: 'video',
+ targetId: data.userID,
+ callSelect: 'single',
+ });
navigateTo('/pages/room/room')
}
}
diff --git a/pages/room/incom.vue b/pages/room/incom.vue
index ff281c7..73a14fb 100644
--- a/pages/room/incom.vue
+++ b/pages/room/incom.vue
@@ -1,118 +1,3 @@
-
-
@@ -147,9 +32,9 @@
{{ callerInfo?.nick || callerInfo?.userID }}
- {{ callState === 'call' ? '语音呼叫中...' : '对话中...' }}
+ {{ callState === 'call' ? '呼叫中,等待对方接受邀请...' : '对话中...' }}
-
+ {{ mediaType === 'audio' ? "语音通话" : "视频通话" }}
@@ -161,7 +46,7 @@
>
- 拒绝
+ {{ callState === 'call' || callState == 'dialogue' ? "挂断" : "拒绝" }}
+
+