H5的<TUICallKit></TUICallKit>注释状态
This commit is contained in:
10
App.vue
10
App.vue
@@ -9,9 +9,15 @@
|
||||
import { TUIChatKit } from './TUIKit'
|
||||
import { getIpBlack } from './api'
|
||||
|
||||
|
||||
TUIChatKit.init()
|
||||
|
||||
const { token } = useAuthUser()
|
||||
// #ifdef APP-PLUS
|
||||
uni.$TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit')
|
||||
console.log(uni.$TUICallKit, 'TUICallKit | ok') // 本地日志
|
||||
// #endif
|
||||
|
||||
const { token, tencentUserSig } = useAuthUser()
|
||||
const { loginTencentIM } = useUserStore()
|
||||
/** 静默登录逻辑 */
|
||||
const silentLogin = async (e: any) => {
|
||||
@@ -21,7 +27,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
console.log(e, '=====222==')
|
||||
console.log(tencentUserSig, '=====222==')
|
||||
if (e?.query?.invitationCode) {
|
||||
reLaunch('/pages/login/phone-register/phone-register', {
|
||||
invitationCode: e.query.invitationCode
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div class="chat" :style="{ marginBottom: keywordHight + 'px' }">
|
||||
<!-- <TUICallKit></TUICallKit> -->
|
||||
<!-- #ifdef H5 -->
|
||||
<!-- <TUICallKit></TUICallKit> -->
|
||||
<!-- #endif -->
|
||||
<div :class="['tui-chat', !isPC && 'tui-chat-h5']">
|
||||
<div
|
||||
v-if="!currentConversationID"
|
||||
@@ -103,7 +105,9 @@
|
||||
TUIConstants,
|
||||
ExtensionInfo
|
||||
} from '@tencentcloud/tui-core-lite'
|
||||
// #ifdef H5
|
||||
// import { TUICallKit } from '@trtc/calls-uikit-vue'
|
||||
// #endif
|
||||
import ChatHeader from './chat-header/index.vue'
|
||||
import MessageList from './message-list/index.vue'
|
||||
import MessageInput from './message-input/index.vue'
|
||||
|
||||
@@ -28,6 +28,35 @@
|
||||
*/
|
||||
const stateData = ref(0)
|
||||
const onDialogShow = async () => {
|
||||
const res = await getAnchorDetail()
|
||||
if (res?.data) {
|
||||
stateData.value = res.data.status
|
||||
} else {
|
||||
stateData.value = 9
|
||||
}
|
||||
|
||||
container?.value?.toggleDialogDisplay(false)
|
||||
if ([0, 2, 9].includes(stateData.value)) {
|
||||
navigateTo(
|
||||
'/TUIKit/components/TUIChat/message-input-toolbar/live-stream/apply',
|
||||
{ type: stateData.value }
|
||||
)
|
||||
return
|
||||
}
|
||||
if (stateData.value === 1) {
|
||||
// 跳转到开播页面
|
||||
uni.navigateTo({
|
||||
url: `/pages/anchor/index?groupId=${encodeURIComponent(
|
||||
props.groupId
|
||||
)}&creatorType=1`
|
||||
})
|
||||
return
|
||||
}
|
||||
if (stateData.value === 3) {
|
||||
showDialog('提示', '您已被封禁,请联系管理员解封', false)
|
||||
return
|
||||
}
|
||||
return
|
||||
if (
|
||||
['Owner', 'Admin'].includes(
|
||||
props.userData.groupProfile.selfInfo.role
|
||||
|
||||
@@ -132,6 +132,7 @@ export default class CallkitPluginServer {
|
||||
}
|
||||
});
|
||||
} catch (error: any) {
|
||||
console.log(error, '====23232===')
|
||||
TUIGlobal.showToast({
|
||||
title: '拨打失败!',
|
||||
icon: 'error',
|
||||
|
||||
@@ -102,6 +102,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {
|
||||
"TencentCloud-TUICallKit" : {
|
||||
"__plugin_info__" : {
|
||||
"name" : "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit",
|
||||
"description" : "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现。",
|
||||
"platforms" : "Android,iOS",
|
||||
"url" : "https://ext.dcloud.net.cn/plugin?id=9035",
|
||||
"android_package_name" : "",
|
||||
"ios_bundle_id" : "",
|
||||
"isCloud" : true,
|
||||
"bought" : 1,
|
||||
"pid" : "9035",
|
||||
"parameters" : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"h5" : {
|
||||
|
||||
@@ -103,6 +103,13 @@ export const useUserStore = defineStore('user', () => {
|
||||
userID: tencentUserSig.value.userId,
|
||||
userSig: tencentUserSig.value.userSig
|
||||
})
|
||||
|
||||
uni.$TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit')
|
||||
uni.$TUICallKit.login({
|
||||
sdkAppID: tencentUserSig.value.sdkappID,
|
||||
userID: tencentUserSig.value.userId,
|
||||
userSig: tencentUserSig.value.userSig
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
## 1.1.3(2025-12-26)
|
||||
- 修复安卓包名冲突问题
|
||||
## 1.1.2(2025-12-16)
|
||||
- 修复缺少依赖引起的编译问题
|
||||
-修复安卓包名冲突问题
|
||||
## 1.1.1(2025-12-16)
|
||||
- 修复与第三方插件同时使用时的编译报错
|
||||
## 1.1.0(2025-12-05)
|
||||
|
||||
@@ -21,13 +21,9 @@
|
||||
<text class="message-role">主播</text>
|
||||
</view>
|
||||
<view class="nickname-content-wrapper">
|
||||
<text v-if="message?.businessID === LIVE_BUSINESS.ADMIN" class="chat-nickname"
|
||||
numberOfLines="1">游客:</text>
|
||||
<text v-else class="chat-nickname"
|
||||
<text class="chat-nickname"
|
||||
numberOfLines="1">{{ message?.sender?.userName || message?.sender?.userID }}:</text>
|
||||
<text v-if="message?.businessID === LIVE_BUSINESS.SIGN" class="chat-content">{{ JSON.parse(message?.data).title }}</text>
|
||||
<text v-else-if="message?.businessID === LIVE_BUSINESS.ADMIN" class="chat-content">1</text>
|
||||
<text v-else class="chat-content">{{ message?.textContent || '' }}</text>
|
||||
<text class="chat-content">{{ message?.textContent || '' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -57,7 +53,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LIVE_BUSINESS } from '@/constants/live-keys'
|
||||
import { ref, watch, computed, onMounted, onUnmounted } from 'vue';
|
||||
import { useBarrageState } from "@/uni_modules/tuikit-atomic-x/state/BarrageState";
|
||||
import { useGiftState } from "@/uni_modules/tuikit-atomic-x/state/GiftState";
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"com.tencent.liteav:LiteAVSDK_Professional:12.7+",
|
||||
"com.tencent.imsdk:imsdk-plus:8.7.+",
|
||||
"com.tencent.liteav.tuikit:tuicore:8.7.+",
|
||||
"io.trtc.uikit:rtc_room_engine:3.5+",
|
||||
"io.trtc.uikit:common:3.3.+"
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user