From 3389a8eaa91270ed8c6c3e83f7c55f15dd36a8d0 Mon Sep 17 00:00:00 2001
From: bobobobo <1055026847@qq.com>
Date: Fri, 6 Feb 2026 01:12:04 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TUIKit/components/TUIChat/index.vue | 21 +
.../message-input-toolbar/call-view/index.vue | 161 +-
composables/useAuthUser.js | 3 +-
pages.json | 31 +-
pages/audience/index.nvue | 1832 ++++++++++-------
pages/discover/discover.vue | 2 +-
pages/mall/confirm-order.vue | 4 +
pages/mall/detail.vue | 4 +-
pages/my-index/withdraw.vue | 3 +
pages/room/incom.vue | 402 ++++
pages/room/room.nvue | 693 +++----
static/images/administrator.png | Bin 0 -> 2687 bytes
stores/user.js | 560 +++--
.../components/BarrageInput.vue | 7 +
.../LiveAudienceList/AudienceActionPanel.nvue | 617 +++---
15 files changed, 2516 insertions(+), 1824 deletions(-)
create mode 100644 pages/room/incom.vue
create mode 100644 static/images/administrator.png
diff --git a/TUIKit/components/TUIChat/index.vue b/TUIKit/components/TUIChat/index.vue
index 69076cf..4309898 100644
--- a/TUIKit/components/TUIChat/index.vue
+++ b/TUIKit/components/TUIChat/index.vue
@@ -84,6 +84,9 @@
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 f3a6dae..d7ca097 100644
--- a/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue
+++ b/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue
@@ -1,108 +1,70 @@
+
-
+
diff --git a/composables/useAuthUser.js b/composables/useAuthUser.js
index 12a492d..38f7cfb 100644
--- a/composables/useAuthUser.js
+++ b/composables/useAuthUser.js
@@ -10,10 +10,11 @@ export const useAuthUser = () => {
const tokenStore = useTokenStore()
// 响应式状态(state & getters)
- const { userInfo, tencentUserSig, fontSizeData, integralData } = storeToRefs(userStore)
+ const { imEngine, userInfo, tencentUserSig, fontSizeData, integralData } = storeToRefs(userStore)
const { token } = storeToRefs(tokenStore)
return {
+ imEngine,
integralData,
userInfo,
tencentUserSig,
diff --git a/pages.json b/pages.json
index 33996f2..e259bfc 100644
--- a/pages.json
+++ b/pages.json
@@ -39,14 +39,14 @@
{
"path": "TUIKit/components/TUIChat/video-play",
"style": {
- "navigationBarTitleText": "腾讯云 IM",
+ "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#EBF0F6"
}
},
{
"path": "TUIKit/components/TUIChat/web-view",
"style": {
- "navigationBarTitleText": "腾讯云 IM",
+ "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#EBF0F6"
}
},
@@ -340,7 +340,7 @@
{
"path": "pages/shop-together/index",
"style": {
- "navigationBarTitleText": "拼团"
+ "navigationBarTitleText": "购买记录"
}
},
{
@@ -441,17 +441,20 @@
}
}
},
- {
- "path" : "pages/room/room",
- "style" :
- {
- "navigationBarTitleText": "Room",
- "enablePullDownRefresh": false,
- "navigationStyle":"custom",
- "gestureBack":"NO"
- }
-
- },
+ {
+ "path": "pages/room/room",
+ "style": {
+ "navigationBarTitleText": "拨打电话",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/room/incom",
+ "style": {
+ "navigationBarTitleText": "拨打视频",
+ "navigationStyle": "custom"
+ }
+ },
// #endif
// #ifdef H5
{
diff --git a/pages/audience/index.nvue b/pages/audience/index.nvue
index 1a2d498..df1f527 100644
--- a/pages/audience/index.nvue
+++ b/pages/audience/index.nvue
@@ -1,25 +1,43 @@
-
-
-
-
-
+
+
+
+
-
-
-
-
- {{ liveDurationText }}
-
+
+
+ {{ liveDurationText }}
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
+ .live-timer {
+ color: #fff;
+ font-size: 24rpx;
+ margin-left: 12rpx;
+ }
+
diff --git a/pages/discover/discover.vue b/pages/discover/discover.vue
index 938263c..ead6b02 100644
--- a/pages/discover/discover.vue
+++ b/pages/discover/discover.vue
@@ -11,7 +11,7 @@
{ name: '公司介绍', icon: 'company' },
{ name: '朋友圈', icon: 'circle' },
{ name: '线上商城', icon: 'mall' },
- { name: '我的拼团伙伴', icon: 'team' },
+ { name: '购买记录', icon: 'team' },
{ name: '项目入口', icon: 'project' },
{ name: '直播列表', icon: 'liveStream' }
]
diff --git a/pages/mall/confirm-order.vue b/pages/mall/confirm-order.vue
index 830654b..ccd9c2f 100644
--- a/pages/mall/confirm-order.vue
+++ b/pages/mall/confirm-order.vue
@@ -160,7 +160,10 @@
})
onLoad(async e => {
+ // groupId
groupId.value = e?.groupId || ''
+ console.log(e?.groupId, '===')
+ formData.startGroup = !!e?.groupId
await getData(e.productId)
})
@@ -267,6 +270,7 @@
diff --git a/pages/mall/detail.vue b/pages/mall/detail.vue
index 74101b4..00ea219 100644
--- a/pages/mall/detail.vue
+++ b/pages/mall/detail.vue
@@ -184,7 +184,7 @@
"
/>
-
+ -->
diff --git a/pages/my-index/withdraw.vue b/pages/my-index/withdraw.vue
index c553fae..80e2757 100644
--- a/pages/my-index/withdraw.vue
+++ b/pages/my-index/withdraw.vue
@@ -12,9 +12,11 @@
} from '@/api/my-index'
import { useUI } from '@/utils/use-ui'
import { useAuthUser } from '@/composables/useAuthUser'
+ import { useUserStore } from '../../stores/user'
const { showToast, showDialog } = useUI()
const { integralData } = useAuthUser()
+ const { getIntegral } = useUserStore()
const tixian = ref(null)
const popup = ref(null)
@@ -120,6 +122,7 @@
}
tixian.value.close()
await addUserWithdraw(data)
+ await getIntegral()
await showToast(`提现成功`, 'success')
navigateBack()
} catch (error) {
diff --git a/pages/room/incom.vue b/pages/room/incom.vue
new file mode 100644
index 0000000..ff281c7
--- /dev/null
+++ b/pages/room/incom.vue
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ callerInfo?.nick || callerInfo?.userID }}
+
+
+ {{ callState === 'call' ? '语音呼叫中...' : '对话中...' }}
+
+
+
+
+
+
+
+
+
+
+ 拒绝
+
+
+
+
+
+
+ 接听
+
+
+
+
+
+
diff --git a/pages/room/room.nvue b/pages/room/room.nvue
index 9aa6a5c..c0ba3d9 100644
--- a/pages/room/room.nvue
+++ b/pages/room/room.nvue
@@ -1,119 +1,102 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 邀请
-
-
- {{curCamera?'关闭':'开启'}}摄像头
-
-
- 切换摄像头
-
-
- {{isMicrophone?'关闭':'开启'}}麦克风
-
-
- {{isEnableSpeaker?'关闭':'开启'}}扬声器
-
-
- 美颜
-
-
-
- 挂断
- 切换语音
-
-
-
- 被邀请者ID:
-
-
- 必填;需加入群后,方可收到邀请,多个userId用英文半角逗号分开
-
-
-
-
-
-
+
+
+
-
-
-
- 美颜{{isChecked?'开启':'关闭'}}
-
-
- X
-
-
-
-
-
- {{item.name}}
+
+
+
+
+
+
+
+ {{ isMicrophone ? '关闭' : '开启' }}麦克风
+
-
-
-
+
+
+
+
+
+ {{ curCamera ? '关闭' : '开启' }}摄像头
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ isEnableSpeaker ? '关闭' : '开启' }}扬声器
+
-
-
- {{item.text}}
+
+
+
+
+
+
+ {{ mediaTypeCur === 'video' ? '切换语音' : '切换视频' }}
+
+
+
+
+
+
+ 挂断
+
+
+
+
+
+ 翻转
-
\ No newline at end of file
+ .white-view {
+ }
+
diff --git a/static/images/administrator.png b/static/images/administrator.png
new file mode 100644
index 0000000000000000000000000000000000000000..273f91f62de18b3502d9589ca39841f97e48631f
GIT binary patch
literal 2687
zcmV-_3V`*AP)8UK0jp4iQ{--H{JK&~xyY3G74!ALa#@*j7_zt)+fyUjR+JYY+AAcq`X3(_z
z(*Opf;)CKR#S}F2FT`~5`1s}VDSlA;QsvJg91d8pfchv}zTXwK3U_k%?
za7)`jp4(Sth@X|_$h9tuA@!{>9*PnNRO|*=69+2$EFhw(0`R>mUR^Gi7ni3$Q9%OR1AS0hg4e0;tKvt+S84}n+A2ECre)Ca{Vd=@OMb+N^%-A8o@Xslk@QD8xF=SW8tdtWpMEK34zWKG!;SI=3H
zv1k^j1i5tAtR8b|!=``*7Yo8~^?G5s+~U4`)wMtuAxnp7{8i(uY19<36pCCitd3h-
z)!T(0GTVmlG}6J#G`nsMII^D2EH|JMZWTvbaWlY$NwGB)y@UYRq9R!_UPZKkuNQT+
zp>Q+6(lMG;WMLBBG(-!?S+MCKb31DZc;Y$8!lKE~)peGf#=wgGI6R(D^qJM+jY3TT
zYkP<$6CFS|s$XpWdr%YU6o_qGv>9NhR&-1L?POYBV#U7ypM1d{*R23Yx<`|aD&?-y?V8b@%k+|nHpy?kfv-C}dVy%jUje}Y-z8?XAdOkg=M`H&^D
zT!!L~)`&&3br8w(0ST%7#1+}T*(7-@xNIAfiX#e|02W+;Vr8Uj<^@0^
z?K!|mul0jl$hL5pOBN}(IbgwMJHTqA@p9Q8%5eArMcJDJTLPb8onl+Cv)K%=z_LFA
z7K^iE*gV#SmHpP=#(aPRXe+ZMPg}sAW=rtOZvq&&>KMx{-O5-NVA&tZOT5cpO9F?_
zQi%W?>bvP5EFKy9(i&a(8k4fA%04ahKDIN%j07Ld7J^)Wq^*JPK
z)kU!{wL4X~39x}1O$y5b78V-SSIYzu;3-xGPhPnia1WO~H<}`!NMUWuEiLM8gEI70
z#D^{}xaxU?$1SX#Ba5_I4OpYF=i*8!I|{(%@ER2!bs=a#WeX$XXY)`qIV&Vb8FKVhF)jiuJ_n09%7IKs){aHd4fx$KH9rsl_AXnT(RE8
zE7~jGG`UCET`&X=H1eI`G8g32b@0QJ8-3&|_FZDW1~PpU
z$snG_Pz>z{DtC;kA^NbEtfEn%-%)|R
zr~=lCM~$%xl(+qyC7*%eQhB$_F9hxx5rDXCb`GQcTl+Cv0WvHGV_4a0z6w|^y;3Ub
zPP0A80K9%YQ4#@yt~T0lhWVHN11JH+V62r+3=0`W`o?!gKKJc)$mJ=$26!@1YV|yS
z>|CO+-R(c~va&bL_8MTj>S-XYVq_hu?tmX_Nes`S!yXy|vY)W>KcWmWx)aD-OJpmc
zzab){h-=6Ek7PPNjM{bA~)KFN612WrD-rY1InhNDk}vAagt4
zX7M7?(Ne&)Idue@6dWCF)}pCb#Gl1Gz{|j0$|y
zK>fDi+fS}*fd86EKZ63@+PGid*G=H0zO`ClA&1{f8)}Wj);Fc_fJiKQ+K8;Jf-k
z`1^+3vR^SzX|wUG;e-Hwi_+QXm4HR#%X@<+zoO
zjH5%zc!UC|Iel2B {
- const {
- clearToken
- } = useTokenStore()
- const {
- showDialog,
- showToast
- } = useUI()
+ const { clearToken } = useTokenStore()
+ const { showDialog, showToast } = useUI()
- const userInfo = ref(
- getUserInfoData() ? JSON?.parse(getUserInfoData()) : {}
- )
- /** 用户字体大小 */
- const fontSizeData = ref(getFontSize())
+ const userInfo = ref(
+ getUserInfoData() ? JSON?.parse(getUserInfoData()) : {}
+ )
+ /** 用户字体大小 */
+ const fontSizeData = ref(getFontSize())
- /** 腾讯 IM 存储数据 */
- const tencentUserSig = ref(getSig() ? JSON?.parse(getSig()) : {})
+ /** 腾讯 IM 存储数据 */
+ const tencentUserSig = ref(getSig() ? JSON?.parse(getSig()) : {})
- /** 用户积分数 */
- const integralData = ref(0)
- const imEngine = ref(null)
+ /** 用户积分数 */
+ const integralData = ref(0)
+ /** 融云 IM 引擎 */
+ const imEngine = ref(null)
- /**
- * 获取用户信息(可从缓存或接口)
- */
- const fetchUserInfo = async () => {
- // 尝试从本地缓存读取
- const cachedToken = getToken()
- const cachedUserInfo = getUserInfoData()
- const cachedSig = getSig()
+ /**
+ * 获取用户信息(可从缓存或接口)
+ */
+ const fetchUserInfo = async () => {
+ // 尝试从本地缓存读取
+ const cachedToken = getToken()
+ const cachedUserInfo = getUserInfoData()
+ const cachedSig = getSig()
- if (cachedToken && cachedUserInfo) {
- userInfo.value = JSON.parse(cachedUserInfo)
- tencentUserSig.value = JSON.parse(cachedSig)
- loginTencentIM()
- return
- }
- await getIntegral()
- const res = await getUserData()
- await setUserInfo(res.data)
- loginTencentIM()
- return
- }
+ if (cachedToken && cachedUserInfo) {
+ userInfo.value = JSON.parse(cachedUserInfo)
+ tencentUserSig.value = JSON.parse(cachedSig)
+ loginTencentIM()
+ return
+ }
+ await getIntegral()
+ const res = await getUserData()
+ await setUserInfo(res.data)
+ loginTencentIM()
+ return
+ }
- /**
- * 设置用户信息
- */
- const setUserInfo = async data => {
- const res = await getTencentUserSig()
- const ryData = await getRongYunLoginInfo()
- const IM_DATA = {
- ...res.data,
- ...ryData.data
- }
- tencentUserSig.value = IM_DATA
- userInfo.value = data
- setUserInfoData(data)
- setSig(IM_DATA)
- }
+ /**
+ * 设置用户信息
+ */
+ const setUserInfo = async data => {
+ const res = await getTencentUserSig()
+ const ryData = await getRongYunLoginInfo()
+ const IM_DATA = {
+ ...res.data,
+ ...ryData.data
+ }
+ tencentUserSig.value = IM_DATA
+ userInfo.value = data
+ setUserInfoData(data)
+ setSig(IM_DATA)
+ }
- /** 获取用户积分 */
- const getIntegral = async () => {
- const res = await getUserIntegral()
- integralData.value = res.data.availablePoints
- }
+ /** 获取用户积分 */
+ const getIntegral = async () => {
+ const res = await getUserIntegral()
+ integralData.value = res.data.availablePoints
+ }
- /**
- * 登录腾讯 IM
- */
- const loginTencentIM = async () => {
- await refreshUserInfo()
- await TUILogin.login({
- SDKAppID: tencentUserSig.value.sdkappID,
- userID: tencentUserSig.value.userId,
- userSig: tencentUserSig.value.userSig,
- framework: `vue3`
- })
+ /**
+ * 登录腾讯 IM
+ */
+ const loginTencentIM = async () => {
+ await refreshUserInfo()
+ await TUILogin.login({
+ SDKAppID: tencentUserSig.value.sdkappID,
+ userID: tencentUserSig.value.userId,
+ userSig: tencentUserSig.value.userSig,
+ framework: `vue3`
+ })
- await TUIChatEngine.login({
- SDKAppID: tencentUserSig.value.sdkappID,
- userID: tencentUserSig.value.userId,
- userSig: tencentUserSig.value.userSig,
- useUploadPlugin: true // 使用文件上传插件
- })
- // #ifdef H5
- await useLoginState().login({
- SDKAppID: tencentUserSig.value.sdkappID,
- userID: tencentUserSig.value.userId,
- userSig: tencentUserSig.value.userSig
- })
- // #endif
+ await TUIChatEngine.login({
+ SDKAppID: tencentUserSig.value.sdkappID,
+ userID: tencentUserSig.value.userId,
+ userSig: tencentUserSig.value.userSig,
+ useUploadPlugin: true // 使用文件上传插件
+ })
+ // #ifdef H5
+ await useLoginState().login({
+ SDKAppID: tencentUserSig.value.sdkappID,
+ userID: tencentUserSig.value.userId,
+ userSig: tencentUserSig.value.userSig
+ })
+ // #endif
- // #ifdef APP-PLUS
- await useLoginState().login({
- sdkAppID: tencentUserSig.value.sdkappID,
- userID: tencentUserSig.value.userId,
- userSig: tencentUserSig.value.userSig
- })
- console.log(tencentUserSig.value.appKey, '====')
- connectIM()
- // #endif
- }
+ // #ifdef APP-PLUS
+ await useLoginState().login({
+ sdkAppID: tencentUserSig.value.sdkappID,
+ userID: tencentUserSig.value.userId,
+ userSig: tencentUserSig.value.userSig
+ })
+ console.log(tencentUserSig.value.appKey, '====')
+ await connectIM()
+ // #endif
+ }
- //连接融云IM
- async function connectIM() {
- const options = {
- naviServer: ''
- }
- imEngine.value = await RCIMIWEngine.create(tencentUserSig.value.appKey, options)
- imEngine.value.setOnConnectedListener((res) => {
- if (res.code != 0) {
- uni.hideLoading();
- uni.showToast({
- title: 'OnCon:' + res.code,
- icon: 'error'
- })
- return
- }
- //连接成功
- CallLib.init({});
- onAllListeners()
- console.log('call.init')
- // this.libPage = true;
- // this.loginUserId = res.userId;
- uni.hideLoading();
- console.log('登录成功')
- if (uni.getSystemInfoSync().platform === 'android') {
- permision.requestAndroidPermission('android.permission.CAMERA');
- permision.requestAndroidPermission('android.permission.RECORD_AUDIO');
- }
- });
- let code = await imEngine.value.connect(tencentUserSig.value.ryToken, 10)
- if (code != 0) {
- uni.hideLoading();
- uni.showToast({
- title: 'connect:' + code,
- icon: 'error'
- })
- }
- }
-
- function onAllListeners(){
- CallLib.onCallReceived(res => {
- console.log(res)
- console.log(
- 'Engine:OnCallReceived=>' + '监听通话呼入, 目标id=>',
- res.data.targetId
- )
- })
-
- CallLib.onCallConnected(res => {
- console.log(res)
- console.log(
- 'Engine:OnCallConnected=>' +
- '已建立通话通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息',
- res
- )
- })
-
- CallLib.onRemoteUserJoined(res => {
- console.log(
- 'Engine:OnRemoteUserJoined=>' +
- '主叫端拨出电话,被叫端收到请求后,加入通话,被叫端Id为=>',
- res.data.userId
- )
- })
-
- CallLib.onCallDisconnected(res => {
- console.log(
- 'Engine:OnCallDisconnected=>' + '挂断成功, 挂断原因=>',
- res.data.reason
- )
- })
- }
+ //连接融云IM
+ const connectIM = async () => {
+ const options = {
+ naviServer: ''
+ }
+ imEngine.value = await RCIMIWEngine.create(
+ tencentUserSig.value.appKey,
+ options
+ )
+ imEngine.value.setOnConnectedListener(res => {
+ if (res.code != 0) {
+ uni.hideLoading()
+ uni.showToast({
+ title: 'OnCon:' + res.code,
+ icon: 'error'
+ })
+ return
+ }
+ //连接成功
+ CallLib.init({})
+ console.log('call.init')
+ // this.libPage = true;
+ // this.loginUserId = res.userId;
+ uni.hideLoading()
+ console.log('登录成功')
+ })
+ const callback = {
+ onDatabaseOpened: res => {
+ console.log('数据库打开')
+ },
+ onConnected: res => {
+ console.log(res)
+ if (res.code === 0) {
+ // uni.showToast({
+ // title: '连接成功',
+ // icon: 'none'
+ // })
+ console.log('连接成功')
+ } else if (res.code === 34001) {
+ // uni.showToast({
+ // title: '连接已存在,不需要再连接',
+ // icon: 'none'
+ // })
+ console.log('连接已存在,不需要再连接')
+ }
+ }
+ }
+ let code = await imEngine.value.connect(
+ tencentUserSig.value.ryToken,
+ 10,
+ callback
+ )
+ if (code != 0) {
+ uni.hideLoading()
+ uni.showToast({
+ title: 'connect:' + code,
+ icon: 'error'
+ })
+ }
+ }
- /**
- * 清除用户信息(退出登录)
- */
- const clearUserInfo = async () => {
- const show = await showDialog('提示', '确定要退出登录吗?')
- if (show) {
- await logout()
- }
- }
+ /**
+ * 清除用户信息(退出登录)
+ */
+ const clearUserInfo = async () => {
+ const show = await showDialog('提示', '确定要退出登录吗?')
+ if (show) {
+ await logout()
+ }
+ }
- /**
- * 退出登录(不带提示)
- */
- const logout = async () => {
- if (!userInfo.value) return
- try {
- userInfo.value = null
+ /**
+ * 退出登录(不带提示)
+ */
+ const logout = async () => {
+ if (!userInfo.value) return
+ try {
+ userInfo.value = null
- await userLogout()
- await TUILogin.logout()
- await TUIChatEngine.logout()
- // #ifdef APP-PLUS
- removeFriendList()
- removeGroupList()
- await useLoginState().logout()
- // #endif
- // #ifdef H5
- await useLoginState().logout()
- // #endif
- clearAllUserInfo()
- await showToast('退出登录成功', 'success')
- reLaunch('/pages/login/login')
- } catch (error) {
- clearAllUserInfo()
- await showToast('退出登录成功', 'success')
- reLaunch('/pages/login/login')
- }
- }
+ await userLogout()
+ await TUILogin.logout()
+ await TUIChatEngine.logout()
+ // #ifdef APP-PLUS
+ removeFriendList()
+ removeGroupList()
+ await useLoginState().logout()
+ // #endif
+ // #ifdef H5
+ await useLoginState().logout()
+ // #endif
+ clearAllUserInfo()
+ await showToast('退出登录成功', 'success')
+ reLaunch('/pages/login/login')
+ } catch (error) {
+ clearAllUserInfo()
+ await showToast('退出登录成功', 'success')
+ reLaunch('/pages/login/login')
+ }
+ }
- /** 清空所有用户缓存 */
- const clearAllUserInfo = async () => {
- userInfo.value = null
- tencentUserSig.value = null
- fontSizeData.value = 26
- clearToken()
- removeUserInfoData()
- removeSig()
- removeFontSize()
- }
+ /** 清空所有用户缓存 */
+ const clearAllUserInfo = async () => {
+ userInfo.value = null
+ tencentUserSig.value = null
+ fontSizeData.value = 26
+ clearToken()
+ removeUserInfoData()
+ removeSig()
+ removeFontSize()
+ }
- /** 刷新用户信息(如用户信息被修改) */
- const refreshUserInfo = async () => {
- const res = await getUserData()
- await getIntegral()
- await setUserInfoData(res.data)
- userInfo.value = res.data
- }
+ /** 刷新用户信息(如用户信息被修改) */
+ const refreshUserInfo = async () => {
+ const res = await getUserData()
+ await getIntegral()
+ await setUserInfoData(res.data)
+ userInfo.value = res.data
+ }
- /**
- * 更新部分用户信息(例如昵称、头像)
- */
- const updateUserInfo = async partialData => {
- if (!userInfo.value) return
- await updateUserData(partialData)
- await refreshUserInfo()
- }
+ /**
+ * 更新部分用户信息(例如昵称、头像)
+ */
+ const updateUserInfo = async partialData => {
+ if (!userInfo.value) return
+ await updateUserData(partialData)
+ await refreshUserInfo()
+ }
- /** 更新字体大小 */
- const updateFontSize = async fontSize => {
- fontSizeData.value = fontSize
- setFontSize(fontSize)
- }
+ /** 更新字体大小 */
+ const updateFontSize = async fontSize => {
+ fontSizeData.value = fontSize
+ setFontSize(fontSize)
+ }
- return {
- userInfo,
- integralData,
- tencentUserSig,
- fontSizeData,
- getIntegral,
- clearAllUserInfo,
- updateFontSize,
- logout,
- refreshUserInfo,
- fetchUserInfo,
- loginTencentIM,
- setUserInfo,
- clearUserInfo,
- updateUserInfo
- }
-})
\ No newline at end of file
+ return {
+ imEngine,
+ userInfo,
+ integralData,
+ tencentUserSig,
+ fontSizeData,
+ getIntegral,
+ clearAllUserInfo,
+ updateFontSize,
+ logout,
+ refreshUserInfo,
+ fetchUserInfo,
+ loginTencentIM,
+ setUserInfo,
+ clearUserInfo,
+ updateUserInfo
+ }
+})
diff --git a/uni_modules/tuikit-atomic-x/components/BarrageInput.vue b/uni_modules/tuikit-atomic-x/components/BarrageInput.vue
index 649848c..eca588f 100644
--- a/uni_modules/tuikit-atomic-x/components/BarrageInput.vue
+++ b/uni_modules/tuikit-atomic-x/components/BarrageInput.vue
@@ -33,6 +33,13 @@
},
fail: (code, msg) => {
console.error(`sendTextMessage failed, code: ${code}, msg: ${msg}`);
+ if (code == 10017) {
+ uni.showModal({
+ title: '提示',
+ content: '你被禁止发言',
+ showCancel: false
+ })
+ }
},
})
inputValue.value = ""
diff --git a/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue b/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue
index 5c9785a..09be220 100644
--- a/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue
+++ b/uni_modules/tuikit-atomic-x/components/LiveAudienceList/AudienceActionPanel.nvue
@@ -1,313 +1,396 @@
-
-
-
-
-
+
-
-
-
-
-
-
-
- 踢出房间
-
-
-
-
-
-
+
+
+
\ No newline at end of file
+ .divider-line {
+ width: 268rpx;
+ height: 10rpx;
+ border-radius: 200rpx;
+ background-color: #ffffff;
+ position: absolute;
+ bottom: 16rpx;
+ }
+
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 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9F=B3=E8=A7=86?=
=?UTF-8?q?=E9=A2=91=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' ? "挂断" : "拒绝" }}
+
+