Merge branch 'master' into test-audio

# Conflicts:
#	pages.json
#	pages/room/incom.vue
#	pages/room/room.nvue
#	stores/user.js
This commit is contained in:
lmx
2026-02-06 21:01:27 +08:00
15 changed files with 2423 additions and 1991 deletions

View File

@@ -84,6 +84,9 @@
</div>
</template>
<script lang="ts" setup>
// #ifdef APP-PLUS
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
// #endif
import {
ref,
onMounted,
@@ -121,6 +124,7 @@
// @Start uniapp use Chat only
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { initChat, logout } from './entry-chat-only.ts'
import { navigateTo } from '../../../utils/router.js'
// 返回状态
const backStatusName = ref('')
@@ -357,6 +361,8 @@
)
currentConversationID.value = conversationID
}
</script>
<style scoped lang="scss" src="./style/index.scss"></style>

View File

@@ -1,108 +1,98 @@
<script setup lang="ts">
// import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index.esm'
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
import custom from '../../../../assets/icon/telephone-icon.svg'
import videoIcon from '../../../../assets/icon/video-icon.svg'
import { isUniFrameWork } from '../../../../utils/env'
import { computed, ref } from 'vue'
import { type IConversationModel } from '@tencentcloud/chat-uikit-engine-lite'
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
import custom from '../../../../assets/icon/telephone-icon.svg'
import videoIcon from '../../../../assets/icon/video-icon.svg'
import { isUniFrameWork } from '../../../../utils/env'
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'
// CallLib.init({});
const props = withDefaults(
defineProps<{
/** 通话状态: 0 语音 1 视频 */
type?: '0' | '1'
/** 信息数据 */
currentConversation?: IConversationModel
}>(),
{
type: '0',
currentConversation: () => ({} as IConversationModel)
}
)
const props = withDefaults(
defineProps<{
/** 通话状态: 0 语音 1 视频 */
type?: '0' | '1'
/** 信息数据 */
currentConversation?: IConversationModel
}>(),
{
type: '0',
currentConversation: () => ({} as IConversationModel)
}
)
/** 语音通话状态 */
const isType = computed(() => props.type === '0')
const evaluateIcon = isType.value ? custom : videoIcon
const emits = defineEmits(['onDialogPopupShowOrHide'])
const container = ref()
const closeDialog = () => {
container?.value?.toggleDialogDisplay(false)
}
/** 语音通话状态 */
const isType = computed(() => props.type === '0')
const onDialogShow = () => {
console.log('弹出窗口', props.currentConversation)
const data = props.currentConversation.userProfile
emits('onDialogPopupShowOrHide', true)
const evaluateIcon = isType.value ? custom : videoIcon
if (isType.value) {
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')
}
}
const emits = defineEmits(['onDialogPopupShowOrHide'])
const onDialogClose = () => {
console.log('关闭窗口')
emits('onDialogPopupShowOrHide', false)
}
const container = ref()
const closeDialog = () => {
container?.value?.toggleDialogDisplay(false)
}
const onDialogShow = () => {
console.log('弹出窗口', isType.value)
console.log('弹出窗口', props.currentConversation)
let targetId = props.currentConversation.userProfile.userID
// emits('onDialogPopupShowOrHide', true)
callOut('single', isType.value ? 'audio' : 'video', targetId)
}
function callOut(callSelect, mediaSelect, targetId) {
console.log('callSelect: ', callSelect)
console.log('mediaSelect: ', mediaSelect)
console.log('targetId: ', targetId)
//单聊音频
if (callSelect === 'single' && mediaSelect === 'audio') {
if (targetId === '') {
uni.showToast({
title: '请输入对方ID',
icon: 'error',
duration: 2000
})
return
}
callMsg(mediaSelect, targetId, callSelect)
} else if (callSelect === 'single' && mediaSelect === 'video') {
if (targetId === '') {
uni.showToast({
title: '请输入对方ID',
icon: 'error',
duration: 2000
})
return
}
//单聊视频
callMsg(mediaSelect, targetId, callSelect)
}
}
function callMsg(mediaSelect, targetId, callSelect) {
console.log(targetId)
console.log(mediaSelect)
uni.setStorageSync('room-parameters', {
callType: 'out',
mediaType: mediaSelect,
targetId: targetId,
callSelect: callSelect
})
uni.navigateTo({
url: '/pages/room/room'
})
}
const onDialogClose = () => {
console.log('关闭窗口')
emits('onDialogPopupShowOrHide', false)
}
const onDial = () => {
const data = props.currentConversation.userProfile
// data.userID
CallLib.enableMicrophone(true)
CallLib.startSingleCall(data.userID, 0, '邀请您进行语音通话')
}
const onDial = () => {
const data = props.currentConversation.userProfile
// data.userID
// CallLib.enableMicrophone(true)
// CallLib.startSingleCall(data.userID, 0, '邀请您进行语音通话')
}
</script>
<template>
<!-- needBottomPopup -->
<ToolbarItemContainer
ref="container"
needBottomPopup
:iconFile="evaluateIcon"
:iconWidth="isUniFrameWork ? '34px' : '20px'"
:iconHeight="isUniFrameWork ? '34px' : '20px'"
@@ -110,7 +100,7 @@
@onDialogShow="onDialogShow"
@onDialogClose="onDialogClose"
>
<view class="box-index">
<!-- <view class="box-index">
<view class="top-icon">
<uni-icons
type="back"
@@ -132,7 +122,18 @@
>
接听
</button>
</view>
<button
@click.stop="
() => {
CallLib.enableMicrophone(true)
CallLib.hangup()
}
"
>
挂点
</button>
</view> -->
</ToolbarItemContainer>
</template>

View File

@@ -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,

View File

@@ -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,16 +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
{
@@ -468,13 +472,6 @@
}
},
// #endif
{
"path": "pages/room/incom",
"style": {
"navigationBarTitleText": "来电",
"navigationStyle": "custom"
}
},
{
"path": "pages/adduser/index",
"style": {

File diff suppressed because it is too large Load Diff

View File

@@ -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' }
]

View File

@@ -160,7 +160,10 @@
})
onLoad(async e => {
// groupId
groupId.value = e?.groupId || ''
console.log(e?.groupId, '===')
formData.startGroup = !!e?.groupId
await getData(e.productId)
})
</script>
@@ -267,6 +270,7 @@
</view>
<view
v-if="groupId"
class="pay-way-item"
@click="formData.startGroup = !formData.startGroup"
>

View File

@@ -184,7 +184,7 @@
"
/>
</view>
<button
<!-- <button
v-if="item.showDate"
@click="
navigateTo('/pages/mall/confirm-order', {
@@ -194,7 +194,7 @@
"
>
去拼单
</button>
</button> -->
</view>
</view>
</view>

View File

@@ -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) {

View File

@@ -1,353 +1,395 @@
<template>
<!-- 来电接听界面 -->
<view class="incoming-call">
<!-- 背景模糊层 -->
<view class="blur-background" v-if="callBackground">
<image :src="callBackground" mode="aspectFill" class="bg-image"></image>
<view class="bg-overlay"></view>
</view>
<!-- 来电接听界面 -->
<view class="incoming-call">
<!-- 背景模糊层 -->
<view class="blur-background" v-if="callBackground">
<image
:src="callBackground"
mode="aspectFill"
class="bg-image"
></image>
<view class="bg-overlay"></view>
</view>
<!-- 主内容区 -->
<view class="caller-info">
<view class="caller-avatar-container">
<view class="caller-avatar" :class="{'avatar-ring': isRinging}">
<image v-if="callerAvatar" :src="callerAvatar" class="avatar-image"></image>
<uni-icons v-else type="contact-filled" size="50" color="#fff"></uni-icons>
</view>
</view>
<text class="caller-name">{{callerName}}</text>
<text class="call-type">{{ localSession.mediaType === 0 ? '语音通话' : "视频通话" }}</text>
<text class="call-status">{{callStatus}}</text>
</view>
<!-- 主内容区 -->
<view class="caller-info">
<view class="caller-avatar-container">
<view class="caller-avatar" :class="{ 'avatar-ring': isRinging }">
<image
v-if="callerInfo?.avatar"
:src="callerInfo?.avatar"
class="avatar-image"
></image>
<uni-icons
v-else
type="contact-filled"
size="50"
color="#fff"
></uni-icons>
</view>
</view>
<text class="caller-name">
{{ callerInfo?.nick || callerInfo?.userID }}
</text>
<text class="call-type">
{{ callState === 'call' ? '呼叫中,等待对方接受邀请...' : '对话中...' }}
</text>
<text class="call-status">{{ mediaType === 'audio' ? "语音通话" : "视频通话" }}</text>
</view>
<!-- 控制按钮 -->
<view class="incoming-controls">
<view class="incoming-control" @click="cutFn(false)">
<view class="call-btn decline-btn" :class="{'btn-active': activeBtn === 'decline'}">
<uni-icons type="closeempty" size="32" color="#fff"></uni-icons>
</view>
<text class="btn-text">拒绝</text>
</view>
<!-- 控制按钮 -->
<view class="incoming-controls">
<view class="incoming-control" @click="cutFn(false)">
<view
class="call-btn decline-btn"
:class="{ 'btn-active': activeBtn === 'decline' }"
>
<uni-icons type="closeempty" size="32" color="#fff"></uni-icons>
</view>
<text class="btn-text">{{ callState === 'call' || callState == 'dialogue' ? "挂断" : "拒绝" }}</text>
</view>
<view class="incoming-control" @click="cutFn(true)">
<view class="call-btn accept-btn" :class="{'btn-active': activeBtn === 'accept'}">
<uni-icons type="checkmarkempty" size="28" color="#fff"></uni-icons>
</view>
<text class="btn-text">接听</text>
</view>
</view>
</view>
<view
v-if="callState === 'answer'"
class="incoming-control"
@click="cutFn(true)"
>
<view
class="call-btn accept-btn"
:class="{ 'btn-active': activeBtn === 'accept' }"
>
<uni-icons
type="checkmarkempty"
size="28"
color="#fff"
></uni-icons>
</view>
<text class="btn-text">接听</text>
</view>
</view>
</view>
</template>
<script>
// #ifdef APP-PLUS
import * as call from "@/uni_modules/RongCloud-CallWrapper/lib/index"
// #endif
export default {
name: "incoming-call",
data() {
return {
// 通话状态
isRinging: true,
isCalling: false,
isEnded: false,
<script setup>
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
import { ref, watch } from 'vue'
import { onLoad, onUnload, onHide } from '@dcloudio/uni-app'
import { TUIUserService } from '@tencentcloud/chat-uikit-engine-lite'
import { useUI } from '../../utils/use-ui'
import { navigateBack } from '../../utils/router'
// 通话时间
callDuration: 0,
callTimer: null,
CallLib.init({})
const { showLoading, hideLoading } = useUI()
const callBackground = ref('/static/images/public/random2.png')
/** 呼叫用户信息 */
const callerInfo = ref({})
/** 通话状态 */
const isRinging = ref(true)
/** 控制按钮状态 */
const activeBtn = ref(null)
/**
* 拨打状态
* call: 发起呼叫
* answer: 接听
* dialogue: 对话中
*/
const callState = ref('')
CallLib.onRemoteUserJoined(res => {
console.log(
'Engine:OnRemoteUserJoined=>' +
'主叫端拨出电话被叫端收到请求后加入通话被叫端Id为=>',
res.data.userId
)
callState.value = 'dialogue'
})
// 控制按钮状态
activeBtn: null,
// 通话设置
isMuted: false,
isSpeakerOn: true,
isVideoOn: true,
// CallLib.onRemoteUserRinging(res => {
// console.log(
// '主叫端拨出电话被叫端收到请求发出振铃响应时触发对端Id为=>',
// res.data.userId
// )
// })
// 控制界面显示
showActionBar: false,
callerName: "用户id",
callerAvatar: "/static/images/public/random2.png",
callBackground: "/static/images/public/random2.png",
localSession: null,
};
},
mounted() {
// 30秒后自动挂断
setTimeout(() => {
if (!this.isCalling && !this.isEnded) {
this.autoDecline();
}
}, 30000);
},
onLoad() {
uni.getStorage({
key: "room-parameters",
success: (res) => {
console.log('res: ',res);
this.localSession = res.data
this.callerName = res.data.mine
}
});
},
methods: {
//是否接入
cutFn(isFlag){
//确认接入
console.log('isFlag: ',isFlag);
if(isFlag){
this.isEnded = true;
console.log('localSession: ',this.localSession);
if (this.localSession.callId && this.localSession.callId.length > 0) {
this.onCallReceived(this.localSession);
}
}else{
//取消接入
call.hangup();
uni.navigateBack()
}
},
//是否接收逻辑
onCallReceived(session) {
// //呼入
uni.setStorageSync('room-parameters', {
callType: 'in',
mediaType: session.mediaType === 0 ? 'audio' : 'video'
});
//跳转.nvue
uni.redirectTo({
url:'/pages/room/room'
});
},
// 自动拒绝(无人接听)
autoDecline() {
this.stopRinging();
this.isEnded = true;
this.callStatus = "未接听";
// CallLib.onError(res => {
// console.log('通话过程中,发生异常,异常原因=>', res.data.reason)
// })
call.hangup();
/** 按钮状态 */
const cutFn = show => {
if (show) {
// 接听电话 dialogue
if(mediaType.value === 'audio'){
CallLib.enableMicrophone(true)
}
CallLib.accept()
callState.value = 'dialogue'
if(mediaType.value === 'video'){
uni.redirectTo({
url: "/pages/room/room"
})
}
} else {
//取消接听,返回上一页
CallLib.hangup()
navigateBack()
}
}
// 2秒后关闭界面
setTimeout(() => {
uni.navigateBack()
}, 2000);
},
}
};
const mediaType= ref("audio")
onLoad(async e => {
callState.value = e.type
mediaType.value = e.mediaType
console.log(e)
showLoading()
const res = await TUIUserService.getUserProfile({
userIDList: [e.userID]
})
hideLoading()
callerInfo.value = res.data[0]
if (e.type === 'call') {
CallLib.enableMicrophone(true)
CallLib.startSingleCall(callerInfo.value.userID, 0, 'answer')
}
if(e.callType == "in"){
// 接听语音通话
callState.value = 'answer'
}
console.log('callState.value: ',callState.value);
console.log('===好友信息', res)
})
// onUnload( ()=>{
// removeAllListeners()
// })
// onHide( ()=>{
// removeAllListeners()
// })
function removeAllListeners(){
//移除监听-接收到通话呼入
CallLib.removeRemoteUserJoinedListener();
// 移除监听-通话已结束
CallLib.removeCallDisconnectedListener();
// 移除监听-通话出现错误的回调
CallLib.removeErrorListener();
}
</script>
<style lang="scss" scoped>
.incoming-call {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #000;
.incoming-call {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #000;
.blur-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
.blur-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
.bg-image {
width: 100%;
height: 100%;
filter: blur(20px);
opacity: 0.6;
}
.bg-image {
width: 100%;
height: 100%;
filter: blur(20px);
opacity: 0.6;
}
.bg-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
}
.bg-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
}
.caller-info {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-top: 100rpx;
z-index: 1;
.caller-info {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-top: 100rpx;
z-index: 1;
.caller-avatar-container {
position: relative;
margin-bottom: 40rpx;
.caller-avatar-container {
position: relative;
margin-bottom: 40rpx;
.caller-avatar {
width: 180rpx;
height: 180rpx;
border-radius: 50%;
background: linear-gradient(135deg, #1aad19, #129611);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
.caller-avatar {
width: 180rpx;
height: 180rpx;
border-radius: 50%;
background: linear-gradient(135deg, #1aad19, #129611);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
.avatar-image {
width: 100%;
height: 100%;
}
.avatar-image {
width: 100%;
height: 100%;
}
&.avatar-ring {
animation: ringPulse 1.5s infinite;
}
}
}
&.avatar-ring {
animation: ringPulse 1.5s infinite;
}
}
}
.caller-name {
font-size: 48rpx;
color: #fff;
font-weight: 500;
margin-bottom: 20rpx;
}
.caller-name {
font-size: 48rpx;
color: #fff;
font-weight: 500;
margin-bottom: 20rpx;
}
.call-type {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 10rpx;
}
.call-type {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 10rpx;
}
.call-status {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.7);
}
.call-status {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.7);
}
.call-timer {
margin-top: 30rpx;
padding: 10rpx 30rpx;
background: rgba(255, 255, 255, 0.1);
border-radius: 30rpx;
.call-timer {
margin-top: 30rpx;
padding: 10rpx 30rpx;
background: rgba(255, 255, 255, 0.1);
border-radius: 30rpx;
.timer-text {
font-size: 32rpx;
color: #fff;
font-weight: 500;
}
}
}
.timer-text {
font-size: 32rpx;
color: #fff;
font-weight: 500;
}
}
}
.incoming-controls {
display: flex;
justify-content: space-around;
padding: 80rpx 100rpx 120rpx;
z-index: 1;
.incoming-controls {
display: flex;
justify-content: space-around;
padding: 80rpx 100rpx 120rpx;
z-index: 1;
.incoming-control {
display: flex;
flex-direction: column;
align-items: center;
.incoming-control {
display: flex;
flex-direction: column;
align-items: center;
.call-btn {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
transition: all 0.2s;
.call-btn {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
transition: all 0.2s;
&.decline-btn {
background-color: #f43f3b;
&.decline-btn {
background-color: #f43f3b;
&.btn-active {
transform: scale(0.9);
background-color: #d93632;
}
}
&.btn-active {
transform: scale(0.9);
background-color: #d93632;
}
}
&.accept-btn {
background-color: #07c160;
&.accept-btn {
background-color: #07c160;
&.btn-active {
transform: scale(0.9);
background-color: #06ad56;
}
}
}
&.btn-active {
transform: scale(0.9);
background-color: #06ad56;
}
}
}
.btn-text {
font-size: 28rpx;
color: #fff;
}
}
}
.btn-text {
font-size: 28rpx;
color: #fff;
}
}
}
.action-bar {
position: absolute;
bottom: 60rpx;
left: 0;
width: 100%;
display: flex;
justify-content: space-around;
padding: 0 60rpx;
z-index: 1;
.action-bar {
position: absolute;
bottom: 60rpx;
left: 0;
width: 100%;
display: flex;
justify-content: space-around;
padding: 0 60rpx;
z-index: 1;
.action-item {
display: flex;
flex-direction: column;
align-items: center;
.action-item {
display: flex;
flex-direction: column;
align-items: center;
.action-icon {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
transition: all 0.3s;
.action-icon {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
transition: all 0.3s;
&.active {
background-color: rgba(255, 255, 255, 0.4);
}
}
&.active {
background-color: rgba(255, 255, 255, 0.4);
}
}
.action-text {
font-size: 24rpx;
color: #fff;
}
}
}
}
.action-text {
font-size: 24rpx;
color: #fff;
}
}
}
}
@keyframes ringPulse {
0% {
box-shadow: 0 0 0 0 rgba(26, 173, 25, 0.4);
}
@keyframes ringPulse {
0% {
box-shadow: 0 0 0 0 rgba(26, 173, 25, 0.4);
}
70% {
box-shadow: 0 0 0 30rpx rgba(26, 173, 25, 0);
}
70% {
box-shadow: 0 0 0 30rpx rgba(26, 173, 25, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(26, 173, 25, 0);
}
}
100% {
box-shadow: 0 0 0 0 rgba(26, 173, 25, 0);
}
}
/* 响应式调整 */
@media (max-height: 600px) {
.incoming-controls {
padding: 40rpx 100rpx 80rpx !important;
}
/* 响应式调整 */
@media (max-height: 600px) {
.incoming-controls {
padding: 40rpx 100rpx 80rpx !important;
}
.action-bar {
bottom: 40rpx !important;
}
}
</style>
.action-bar {
bottom: 40rpx !important;
}
}
</style>

View File

@@ -1,13 +1,20 @@
<template>
<view class="content">
<!-- 单人视频 -->
<view v-if="users.length<=2">
<RongCloud-Call-RCUniCallView class="bigVideoView"
:style="{width:windowWidth+'px',height:windowHeight+'px'}" ref="bigVideoView">
</RongCloud-Call-RCUniCallView>
<RongCloud-Call-RCUniCallView class="smallVideoView" :style="{width:200+'upx',height:200+'upx'}"
ref="smallVideoView">
</RongCloud-Call-RCUniCallView>
<view v-if="users.length <= 2">
<RongCloud-Call-RCUniCallView
class="bigVideoView"
:style="{
width: windowWidth + 'px',
height: windowHeight + 'px'
}"
ref="bigVideoView"
></RongCloud-Call-RCUniCallView>
<RongCloud-Call-RCUniCallView
class="smallVideoView"
:style="{ width: 200 + 'upx', height: 200 + 'upx' }"
ref="smallVideoView"
></RongCloud-Call-RCUniCallView>
</view>
<!-- 底部按钮 -->
@@ -15,69 +22,69 @@
<view class="control-row">
<view class="icon-item" @click="microphone">
<view class="control-icon">
<uni-icons :type="isMicrophone ? 'mic' : 'micoff'" size="24" color="#fff"></uni-icons>
<uni-icons
:type="isMicrophone ? 'mic' : 'micoff'"
size="24"
color="#fff"
></uni-icons>
</view>
<text class="btn-text">
{{isMicrophone?'关闭':'开启'}}麦克风
{{ isMicrophone ? '关闭' : '开启' }}麦克风
</text>
</view>
<view class="icon-item" @click="closeCameraCur">
<view class="control-icon">
<uni-icons :type="curCamera ? 'eye' : 'eye-slash'" size="24" color="#fff"></uni-icons>
<uni-icons
:type="curCamera ? 'eye' : 'eye-slash'"
size="24"
color="#fff"
></uni-icons>
</view>
<text class="btn-text">
{{curCamera?'关闭':'开启'}}摄像头
{{ curCamera ? '关闭' : '开启' }}摄像头
</text>
</view>
<view class="icon-item" @click="enableSpeaker">
<view class="control-icon">
<uni-icons :type="isEnableSpeaker ? 'sound' : 'sound'" size="24"
color="#fff"></uni-icons>
<uni-icons
:type="isEnableSpeaker ? 'sound' : 'sound'"
size="24"
color="#fff"
></uni-icons>
</view>
<text class="btn-text">
{{isEnableSpeaker?'关闭':'开启'}}扬声器
{{ isEnableSpeaker ? '关闭' : '开启' }}扬声器
</text>
</view>
<view class="icon-item" @click="switchCamera">
<view class="control-icon">
<uni-icons type="refresh" size="24" color="#fff"></uni-icons>
</view>
<text class="btn-text">翻转</text>
</view>
</view>
<view class="control-row" :style="{width:windowWidth+'px'}">
<view class="icon-item" @click="changeMediaType">
<view class="control-icon">
<uni-icons :type="mediaTypeCur === 'video' ? 'phone' : 'videocam'" size="24"
color="#fff"></uni-icons>
</view>
<text class="btn-text">
{{mediaTypeCur === 'video' ? '切换语音' : '切换视频'}}
</text>
</view>
<view class="control-row" :style="{ width: windowWidth + 'px' }">
<view class="hangup-btn icon-item" @click="hangup">
<view class="hangup-icon control-icon">
<uni-icons type="phone" size="28" color="#fff"></uni-icons>
</view>
<text class="hangup-text">挂断</text>
</view>
<view class="icon-item" @click="switchCamera">
<view class="control-icon">
<uni-icons type="refresh" size="24" color="#fff"></uni-icons>
</view>
<text class="btn-text">
翻转
</text>
</view>
</view>
</view>
</view>
</template>
<script>
import * as call from "@/uni_modules/RongCloud-CallWrapper/lib/index"
import * as call from '@/uni_modules/RongCloud-CallWrapper/lib/index'
// import * as im from "@/uni_modules/RongCloud-IMWrapper/js_sdk/index"
// import RCBeautyEngine from "@/uni_modules/RongCloud-BeautyWrapper/lib/RCBeautyEngine"
export default {
data() {
return {
mediaType: "video",
callType: "out",
mediaType: 'video',
callType: 'out',
callWay: 0, //呼叫方式 0 单聊 1 群聊
targetId: "",
targetId: '',
bottomHeight: 0,
isConnected: false,
isSelf: false,
@@ -107,203 +114,284 @@
isChecked: false
}
},
onLoad: function() {
var _this = this;
onLoad: function () {
var _this = this
uni.getStorage({
key: "room-parameters",
success: (res) => {
this.mediaType = res.data.mediaType;
this.callType = res.data.callType ? res.data.callType : 'in';
this.groupId = res.data.groupId ? res.data.groupId : '';
this.userIds = res.data.userIds ? res.data.userIds : '';
key: 'room-parameters',
success: res => {
console.log('room-parameters: ',res);
this.mediaType = res.data.mediaType
this.callType = res.data.callType ? res.data.callType : 'in'
this.groupId = res.data.groupId ? res.data.groupId : ''
this.userIds = res.data.userIds ? res.data.userIds : ''
if (this.callType === 'out') {
console.log('呼出out')
this.targetId = res.data.targetId;
this.startCall();
this.targetId = res.data.targetId
this.startCall()
} else {
console.log('呼入接受')
this.accept();
this.accept()
}
}
});
})
uni.getSystemInfo({
success: function(res) {
_this.windowWidth = res.windowWidth;
_this.windowHeight = res.windowHeight;
success: function (res) {
_this.windowWidth = res.windowWidth
_this.windowHeight = res.windowHeight
}
})
uni.$on('OnCallConnected', this.onCallConnected)
uni.$on('OnCallDisconnected', this.onCallDisconnected)
this.initBeautyOpton();
},
beforeDestroy() {
uni.$off('OnCallDisconnected');
uni.$off('OnCallConnected');
},
uni.$off('OnCallDisconnected')
uni.$off('OnCallConnected')
},
onUnload() {
call.hangup();
call.hangup()
// this.removeAllListeners()
},
onHide() {
const session = call.getCurrentCallSession();
const session = call.getCurrentCallSession()
if (session) {
call.hangup();
call.hangup()
}
// this.removeAllListeners()
},
methods: {
removeAllListeners(){
//移除监听-接收到通话呼入
call.removeRemoteUserJoinedListener();
// 移除监听-通话已结束
call.removeCallDisconnectedListener();
// 移除监听-通话出现错误的回调
call.removeErrorListener();
},
changeMediaType() {
if(this.mediaTypeCur == 'video'){
this.mediaTypeCur = 'audio';
}else {
this.mediaTypeCur = 'video';
if (this.mediaTypeCur == 'video') {
this.mediaTypeCur = 'audio'
} else {
this.mediaTypeCur = 'video'
}
call.changeMediaType(0);
call.changeMediaType(0)
},
inviteUsers(flag) {
if (flag) {
if (this.inviteUsersIds === '') {
uni.showToast({
title: "请输入被邀请者ID",
icon: "error",
title: '请输入被邀请者ID',
icon: 'error',
duration: 2000
})
return;
return
}
let userIdsArr = this.inviteUsersIds.split(',');
call.inviteUsers(userIdsArr, []);
let userIdsArr = this.inviteUsersIds.split(',')
call.inviteUsers(userIdsArr, [])
}
this.$refs.inviteInput.blur();
this.isMark = false;
this.$refs.inviteInput.blur()
this.isMark = false
},
switchVideo() {
this.isMe = !this.isMe;
let session = call.getCurrentCallSession();
this.isMe = !this.isMe
let session = call.getCurrentCallSession()
if (this.isMe) {
switch (uni.getSystemInfoSync().platform) {
case 'android':
call.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0, false);
call.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0, true);
break;
call.setVideoView(
session.targetId,
this.$refs.bigVideoView.ref,
0,
false
)
call.setVideoView(
session.mine.userId,
this.$refs.smallVideoView.ref,
0,
true
)
break
case 'ios':
call.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0);
call.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0);
break;
call.setVideoView(
session.targetId,
this.$refs.bigVideoView.ref,
0
)
call.setVideoView(
session.mine.userId,
this.$refs.smallVideoView.ref,
0
)
break
default:
console.log('运行在开发者工具上')
break;
break
}
} else {
switch (uni.getSystemInfoSync().platform) {
case 'android':
call.setVideoView(session.mine.userId, this.$refs.bigVideoView.ref, 0, false);
call.setVideoView(session.targetId, this.$refs.smallVideoView.ref, 0, true);
break;
call.setVideoView(
session.mine.userId,
this.$refs.bigVideoView.ref,
0,
false
)
call.setVideoView(
session.targetId,
this.$refs.smallVideoView.ref,
0,
true
)
break
case 'ios':
call.setVideoView(session.mine.userId, this.$refs.bigVideoView.ref, 0);
call.setVideoView(session.targetId, this.$refs.smallVideoView.ref, 0);
break;
call.setVideoView(
session.mine.userId,
this.$refs.bigVideoView.ref,
0
)
call.setVideoView(
session.targetId,
this.$refs.smallVideoView.ref,
0
)
break
default:
console.log('运行在开发者工具上')
break;
break
}
}
},
closeCameraCur() {
this.curCamera = !this.curCamera;
let camera = call.currentCamera();
this.curCamera = !this.curCamera
let camera = call.currentCamera()
call.enableCamera(this.curCamera, camera)
},
closeCameraBack() {
this.backCamera = !this.backCamera;
this.backCamera = !this.backCamera
call.enableCamera(this.backCamera, 1)
},
switchCamera() {
call.switchCamera();
call.switchCamera()
},
microphone() {
this.isMicrophone = !this.isMicrophone;
call.enableMicrophone(this.isMicrophone);
this.isMicrophone = !this.isMicrophone
call.enableMicrophone(this.isMicrophone)
},
enableSpeaker() {
this.isEnableSpeaker = !this.isEnableSpeaker;
call.enableSpeaker(this.isEnableSpeaker);
this.isEnableSpeaker = !this.isEnableSpeaker
call.enableSpeaker(this.isEnableSpeaker)
},
hangup() {
this.isSelf = true;
call.hangup();
this.isSelf = true
call.hangup()
uni.navigateBack({
delta: 1
})
},
accept() {
call.accept();
call.accept()
},
startCall() {
const type = this.mediaType === 'audio' ? 0 : 1;
this.mediaTypeCur = this.mediaType;
const type = this.mediaType === 'audio' ? 0 : 1
this.mediaTypeCur = this.mediaType
if (this.targetId.length > 0) {
call.enableSpeaker(true);
call.startSingleCall(this.targetId, type, null);
this.currentCallSession = call.getCurrentCallSession();
this.users = this.currentCallSession.users ? this.currentCallSession.users : [];
call.enableSpeaker(true)
call.startSingleCall(this.targetId, type, null)
this.currentCallSession = call.getCurrentCallSession()
this.users = this.currentCallSession.users
? this.currentCallSession.users
: []
} else {
call.startGroupCall(this.groupId, this.userIds, [], type, '');
this.users = this.userIds;
call.startGroupCall(this.groupId, this.userIds, [], type, '')
this.users = this.userIds
console.log(this.users);
this.currentCallSession = call.getCurrentCallSession();
this.users = this.currentCallSession.users ? this.currentCallSession.users : [];
console.log(this.users)
this.currentCallSession = call.getCurrentCallSession()
this.users = this.currentCallSession.users
? this.currentCallSession.users
: []
}
let _this = this;
console.log('this.users: ',this.users);
let _this = this
// im.getCurrentUserId(function(result){
// _this.systemInfoSync(result.userId,_this.$refs.bigVideoView.ref,false);
// })
if (this.currentCallSession) {
this.systemInfoSync(this.currentCallSession.mine.userId, this.$refs.bigVideoView.ref, false);
this.systemInfoSync(
this.currentCallSession.mine.userId,
this.$refs.bigVideoView.ref,
false
)
}
},
onCallConnected() {
let context = this;
console.log('oncallconnected接收了');
this.mediaTypeCur = this.mediaType;
call.enableSpeaker(true);
this.currentCallSession = call.getCurrentCallSession();
this.callWay = this.currentCallSession.callType;
this.users = this.currentCallSession.users ? this.currentCallSession.users : [];
let isHasMine = this.users.findIndex((item) => {
return item.userId === this.currentCallSession.mine.userId;
});
let context = this
console.log('oncallconnected接收了')
this.mediaTypeCur = this.mediaType
call.enableSpeaker(true)
this.currentCallSession = call.getCurrentCallSession()
this.callWay = this.currentCallSession.callType
this.users = this.currentCallSession.users
? this.currentCallSession.users
: []
let isHasMine = this.users.findIndex(item => {
return item.userId === this.currentCallSession.mine.userId
})
if (isHasMine === -1) {
this.users.push(this.currentCallSession.mine);
this.users.push(this.currentCallSession.mine)
}
if (this.currentCallSession && this.currentCallSession.users.length > 0) {
if (
this.currentCallSession &&
this.currentCallSession.users.length > 0
) {
//视频是两个的时候
if (this.currentCallSession.users.length <= 2) {
setTimeout(() => {
this.systemInfoSync(this.currentCallSession.mine.userId, this.$refs.smallVideoView.ref,
true);
this.viewArr = this.currentCallSession.users.filter((item) => {
return item.userId !== this.currentCallSession.mine.userId;
});
this.viewArr.forEach((itm) => {
this.targetId = itm.userId;
this.systemInfoSync(itm.userId, this.$refs.bigVideoView.ref, false);
});
}, 100);
this.systemInfoSync(
this.currentCallSession.mine.userId,
this.$refs.smallVideoView.ref,
true
)
this.viewArr = this.currentCallSession.users.filter(
item => {
return (
item.userId !== this.currentCallSession.mine.userId
)
}
)
this.viewArr.forEach(itm => {
this.targetId = itm.userId
this.systemInfoSync(
itm.userId,
this.$refs.bigVideoView.ref,
false
)
})
}, 100)
} else {
// 视频超过三个
this.$nextTick(() => {
this.systemInfoSync(this.currentCallSession.mine.userId, this.$refs.bigVideoView.ref,
false);
this.viewArr = this.currentCallSession.users.filter((item) => {
return item.userId !== this.currentCallSession.mine.userId;
});
this.systemInfoSync(
this.currentCallSession.mine.userId,
this.$refs.bigVideoView.ref,
false
)
this.viewArr = this.currentCallSession.users.filter(
item => {
return (
item.userId !== this.currentCallSession.mine.userId
)
}
)
setTimeout(() => {
this.viewArr.forEach((itm) => {
this.systemInfoSync(itm.userId, this.$refs[itm.userId][0].ref,
false);
});
this.viewArr.forEach(itm => {
this.systemInfoSync(
itm.userId,
this.$refs[itm.userId][0].ref,
false
)
})
}, 100)
})
}
@@ -312,18 +400,18 @@
systemInfoSync(userId, ref, isZOrderOnTop) {
switch (uni.getSystemInfoSync().platform) {
case 'android':
call.setVideoView(userId, ref, 0, isZOrderOnTop);
break;
call.setVideoView(userId, ref, 0, isZOrderOnTop)
break
case 'ios':
call.setVideoView(userId, ref, 0);
break;
call.setVideoView(userId, ref, 0)
break
default:
console.log('运行在开发者工具上')
break;
break
}
},
onCallDisconnected() {
this.isMe = true;
this.isMe = true
if (!this.isSelf) {
uni.navigateBack({
delta: 1
@@ -331,13 +419,13 @@
}
},
switchChange() {
this.isChecked = !this.isChecked;
this.isChecked = !this.isChecked
if (!this.isChecked) {
this.reset();
this.reset()
} else {
this.setBeautyOption();
this.setBeautyOption()
}
},
}
}
}
</script>
@@ -400,7 +488,7 @@
flex-direction: column;
align-items: center;
gap: 8rpx;
margin: 10rpx;
margin: 10rpx 20rpx;
}
.control-icon {
@@ -463,14 +551,13 @@
background: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}
.box-mark {
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, .5);
background: rgba(0, 0, 0, 0.5);
z-index: 9999;
justify-content: center;
align-items: center;
@@ -576,7 +663,6 @@
background: #ccc;
padding-left: 30upx;
padding-right: 30upx;
}
.beauty-tab {
@@ -590,7 +676,8 @@
padding-top: 40upx;
}
.filte-view {}
.filte-view {
}
.tab-item {
width: 100upx;
@@ -605,5 +692,6 @@
background: yellow;
}
.white-view {}
</style>
.white-view {
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,382 +1,326 @@
import { defineStore } from 'pinia'
import {
defineStore
} from 'pinia'
import {
getToken,
getUserInfoData,
setUserInfoData,
removeUserInfoData,
getSig,
setSig,
removeSig,
getFontSize,
setFontSize,
removeFontSize
getToken,
getUserInfoData,
setUserInfoData,
removeUserInfoData,
getSig,
setSig,
removeSig,
getFontSize,
setFontSize,
removeFontSize
} from '@/utils/storage'
// #ifdef APP-PLUS
import {
useLoginState
} from '@/uni_modules/tuikit-atomic-x/state/LoginState'
import * as CallLib from "@/uni_modules/RongCloud-CallWrapper/lib/index"
import { useLoginState } from '@/uni_modules/tuikit-atomic-x/state/LoginState'
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
import RCIMIWEngine from '@/uni_modules/RongCloud-IMWrapper-V2/js_sdk/RCIMEngine'
import permision from "@/js_sdk/wa-permission/permission.js"
import {
reasonDeal,
errorDeal,
imCode
} from '@/utils/code.js'
import { reasonDeal, errorDeal, imCode } from '@/utils/code.js'
// #endif
// #ifdef H5
import {
useLoginState
} from 'tuikit-atomicx-vue3'
import { useLoginState } from 'tuikit-atomicx-vue3'
// #endif
import {
useTokenStore
} from './token'
import {
getUserData,
userLogout,
updateUserData
} from '@/api'
import {
ref
} from 'vue'
import {
useUI
} from '@/utils/use-ui'
import {
reLaunch
} from '@/utils/router'
import {
getTencentUserSig
} from '@/api'
import {
TUILogin
} from '@tencentcloud/tui-core-lite'
import {
TUIChatEngine
} from '@tencentcloud/chat-uikit-engine-lite'
import {
getUserIntegral
} from '@/api/my-index'
import {
removeFriendList,
removeGroupList
} from '../utils/storage'
import {
getRongYunLoginInfo
} from '../api'
import { useTokenStore } from './token'
import { getUserData, userLogout, updateUserData } from '@/api'
import { ref } from 'vue'
import { useUI } from '@/utils/use-ui'
import { reLaunch } from '@/utils/router'
import { getTencentUserSig } from '@/api'
import { TUILogin } from '@tencentcloud/tui-core-lite'
import { TUIChatEngine } from '@tencentcloud/chat-uikit-engine-lite'
import { getUserIntegral } from '@/api/my-index'
import { removeFriendList, removeGroupList } from '../utils/storage'
import { getRongYunLoginInfo } from '../api'
export const useUserStore = defineStore('user', () => {
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
}
//连接融云IM
async function connectIM() {
const options = {
naviServer: ''
}
if(!imEngine.value){
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')
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
)
let session = res.data
// //呼入
// #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
// #ifdef APP-PLUS
// CallLib.init({})
CallLib.onCallReceived(res => {
console.log(
'Engine:OnCallReceived=>' + '监听通话呼入, 目标id=>',
res.data
)
console.log('res: ',res.data);
if (res.data.targetId) {
// let url = res.data.mediaType == 0 ? "" : "/pages/room/room"
uni.setStorageSync('room-parameters', {
callType: 'in',
mediaType: session.mediaType === 0 ? 'audio' : 'video',
callId: res.data.callId,
mine: res.data.mine.userId
mediaType: res.data.mediaType === 0 ? 'audio' : 'video'
});
//跳转.nvue
uni.navigateTo({
url:'/pages/room/incom'
});
})
CallLib.onCallConnected(res => {
console.log(res)
console.log(
'Engine:OnCallConnected=>' +
'已建立通话通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息',
res
)
})
CallLib.onRemoteUserInvited((res)=>{
console.log("Engine:OnRemoteUserInvited=>"+"通话中的某一个参与者,邀请好友加入通话 ,远端Id为=>", res.data.userId);
uni.$emit('OnCallConnected');
})
CallLib.onRemoteUserJoined(res => {
console.log(
'Engine:OnRemoteUserJoined=>' +
'主叫端拨出电话被叫端收到请求后加入通话被叫端Id为=>',
res.data.userId
)
uni.$emit('OnCallConnected');
})
CallLib.onCallDisconnected(res => {
console.log(
'Engine:OnCallDisconnected=>' + '挂断成功, 挂断原因=>',
res.data.reason
)
uni.$emit('OnCallDisconnected');
uni.navigateBack()
})
}
/**
* 清除用户信息(退出登录)
*/
const clearUserInfo = async () => {
const show = await showDialog('提示', '确定要退出登录吗?')
if (show) {
await logout()
}
}
/**
* 退出登录(不带提示)
*/
const logout = async () => {
if (!userInfo.value) return
try {
userInfo.value = null
await userLogout()
await TUILogin.logout()
await TUIChatEngine.logout()
// #ifdef APP-PLUS
removeFriendList()
removeGroupList()
removeAllListeners()
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')
}
}
uni.navigateTo("/pages/room/incom", {
type: res.data.extra,
callType: 'in',
mediaType: res.data.mediaType == 0 ? "audio" : "video",
userID: res.data.mine.userId // 对方的用户id
})
}
})
/** 挂断电话 */
CallLib.onCallDisconnected(res => {
console.log(
'Engine:OnCallDisconnected=>' + '挂断成功, 挂断原因=>',
res.data.reason
)
uni.navigateBack()
})
CallLib.onError(res => {
console.log('通话过程中,发生异常,异常原因=>', res.data.reason)
uni.navigateBack()
})
function removeAllListeners(){
CallLib.unInit();
//移除监听-接收到通话呼入
CallLib.removeCallReceivedListener();
// 移除监听-开始呼叫通话的回调
CallLib.removeCallOutgoingListener();
// 移除监听-通话已接通
CallLib.removeCallReceivedListener();
// 移除监听-通话已结束
CallLib.removeCallDisconnectedListener();
// 移除监听-对端用户正在振铃
CallLib.removeRemoteUserRingingListener();
// 移除监听-对端用户加入了通话
CallLib.removeRemoteUserJoinedListener();
// 移除监听-有用户被邀请加入通话
CallLib.removeRemoteUserInvited();
// 移除监听-对端用户挂断
CallLib.removeRemoteUserLeftListener();
// 移除监听-对端用户切换了媒体类型
CallLib.removeRemoteUserMediaTypeChangedListener();
// 移除监听-通话出现错误的回调
CallLib.removeErrorListener();
// #endif
}
//连接融云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 clearAllUserInfo = async () => {
userInfo.value = null
tencentUserSig.value = null
fontSizeData.value = 26
clearToken()
removeUserInfoData()
removeSig()
removeFontSize()
}
/**
* 清除用户信息(退出登录)
*/
const clearUserInfo = async () => {
const show = await showDialog('提示', '确定要退出登录吗?')
if (show) {
await logout()
}
}
/** 刷新用户信息(如用户信息被修改) */
const refreshUserInfo = async () => {
const res = await getUserData()
await getIntegral()
await setUserInfoData(res.data)
userInfo.value = res.data
}
/**
* 退出登录(不带提示)
*/
const logout = async () => {
if (!userInfo.value) return
try {
userInfo.value = null
/**
* 更新部分用户信息(例如昵称、头像)
*/
const updateUserInfo = async partialData => {
if (!userInfo.value) return
await updateUserData(partialData)
await refreshUserInfo()
}
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 updateFontSize = async fontSize => {
fontSizeData.value = fontSize
setFontSize(fontSize)
}
/** 清空所有用户缓存 */
const clearAllUserInfo = async () => {
userInfo.value = null
tencentUserSig.value = null
fontSizeData.value = 26
clearToken()
removeUserInfoData()
removeSig()
removeFontSize()
}
return {
userInfo,
integralData,
tencentUserSig,
fontSizeData,
getIntegral,
clearAllUserInfo,
updateFontSize,
logout,
refreshUserInfo,
fetchUserInfo,
loginTencentIM,
setUserInfo,
clearUserInfo,
updateUserInfo
}
})
/** 刷新用户信息(如用户信息被修改) */
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 updateFontSize = async fontSize => {
fontSizeData.value = fontSize
setFontSize(fontSize)
}
return {
imEngine,
userInfo,
integralData,
tencentUserSig,
fontSizeData,
getIntegral,
clearAllUserInfo,
updateFontSize,
logout,
refreshUserInfo,
fetchUserInfo,
loginTencentIM,
setUserInfo,
clearUserInfo,
updateUserInfo
}
})

View File

@@ -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 = ""

View File

@@ -1,313 +1,396 @@
<template>
<view class="bottom-drawer-container" v-if="modelValue">
<view class="drawer-overlay" @tap="close"></view>
<view class="bottom-drawer" :class="{ 'drawer-open': modelValue }">
<view class="drawer-header">
<view class="user-info">
<image class="user-avatar" :src="userInfo?.avatarURL || defaultAvatarURL" mode="aspectFill" />
<view class="user-details">
<view class="name-badge-row">
<text class="user-name">{{ userInfo?.userName || userInfo?.userID || '' }}</text>
<!-- <view class="badge">
<view class="bottom-drawer-container" v-if="modelValue">
<view class="drawer-overlay" @tap="close"></view>
<view class="bottom-drawer" :class="{ 'drawer-open': modelValue }">
<view class="drawer-header">
<view class="user-info">
<image
class="user-avatar"
:src="userInfo?.avatarURL || defaultAvatarURL"
mode="aspectFill"
/>
<view class="user-details">
<view class="name-badge-row">
<text class="user-name">
{{ userInfo?.userName || userInfo?.userID || '' }}
</text>
<!-- <view class="badge">
<image class="badge-icon" src="/static/images/heart.png" mode="aspectFit" />
<text class="badge-text">65</text>
</view> -->
</view>
<text class="user-id">ID: {{ userInfo?.userID || '' }}</text>
</view>
</view>
<!-- <view class="follow-button" @tap="followUser">
</view>
<text class="user-id">ID: {{ userInfo?.userID || '' }}</text>
</view>
</view>
<!-- <view class="follow-button" @tap="followUser">
<text class="follow-text">Follow</text>
</view> -->
</view>
</view>
<view class="drawer-content">
<view class="drawer-actions">
<!-- <view class="action-btn" @tap="muteSpeak">
<view class="action-btn-image-container">
<image class="action-btn-image" v-if="userInfo?.isMessageDisabled" src="/static/images/unmute-speak.png"
mode="aspectFit" />
<image class="action-btn-image" v-else src="/static/images/mute-speak.png" mode="aspectFit" />
</view>
<text class="action-btn-content" v-if="userInfo?.isMessageDisabled">解除禁言</text>
<text class="action-btn-content" v-else>禁言</text>
</view> -->
<view class="action-btn" @tap="kickOut">
<view class="action-btn-image-container">
<image class="action-btn-image" src="/static/images/kick-out-room.png" mode="aspectFit" />
</view>
<text class="action-btn-content">踢出房间</text>
</view>
</view>
<!-- <view class="divider-line-container">
<view class="drawer-content">
<view class="drawer-actions">
<view class="action-btn" @tap="muteSpeak">
<view class="action-btn-image-container">
<image
class="action-btn-image"
v-if="userInfo?.isMessageDisabled"
src="/static/images/unmute-speak.png"
mode="aspectFit"
/>
<image
class="action-btn-image"
v-else
src="/static/images/mute-speak.png"
mode="aspectFit"
/>
</view>
<text
class="action-btn-content"
v-if="userInfo?.isMessageDisabled"
>
解除禁言
</text>
<text class="action-btn-content" v-else>禁言</text>
</view>
<view class="action-btn" @tap="kickOut">
<view class="action-btn-image-container">
<image
class="action-btn-image"
src="/static/images/kick-out-room.png"
mode="aspectFit"
/>
</view>
<text class="action-btn-content">踢出房间</text>
</view>
<view class="action-btn" @tap="onDdmini">
<view class="action-btn-image-container">
<image
class="action-btn-image"
src="/static/images/administrator.png"
mode="aspectFit"
/>
</view>
<text class="action-btn-content">设置管理员</text>
</view>
</view>
<!-- <view class="divider-line-container">
<view class="divider-line"></view>
</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import {
useLiveListState
} from "@/uni_modules/tuikit-atomic-x/state/LiveListState";
import {
useLiveAudienceState
} from "@/uni_modules/tuikit-atomic-x/state/LiveAudienceState";
const {
currentLive
} = useLiveListState();
const {
setAdministrator,
revokeAdministrator,
kickUserOutOfRoom,
disableSendMessage
} = useLiveAudienceState(uni?.$liveID);
import { ref, computed } from 'vue'
import { useLiveListState } from '@/uni_modules/tuikit-atomic-x/state/LiveListState'
import { useLiveAudienceState } from '@/uni_modules/tuikit-atomic-x/state/LiveAudienceState'
const { currentLive } = useLiveListState()
const {
setAdministrator,
revokeAdministrator,
kickUserOutOfRoom,
disableSendMessage
} = useLiveAudienceState(uni?.$liveID)
const defaultAvatarURL = 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_01.png';
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
userInfo: {
type: Object,
},
liveID: {
type: String,
}
});
const defaultAvatarURL =
'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_01.png'
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
userInfo: {
type: Object
},
liveID: {
type: String
}
})
const emit = defineEmits(['update:modelValue']);
const close = () => {
emit('update:modelValue', false);
};
const emit = defineEmits(['update:modelValue', 'update:userInfo'])
const muteSpeak = () => {
console.log(
`mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}`);
const params = {
liveID: uni?.$liveID,
userID: props?.userInfo?.userID,
isDisable: !props?.userInfo?.isMessageDisabled,
};
const userData = computed({
get() {
return props.userInfo
},
set(value) {
emit('update:userInfo', value)
}
})
if (props?.userInfo?.isMessageDisabled) {
disableSendMessage(params);
} else {
disableSendMessage(params);
}
const close = () => {
emit('update:modelValue', false)
}
close();
};
/** 设置为管理员 */
const onDdmini = () => {
console.log('====', userData.value)
uni.showModal({
title: `提示`,
content: `确认设置该用户为管理员?`,
success: c => {
if (c.confirm) {
uni.showLoading({
title: '加载中...',
mask: true // 防止穿透点击
})
setAdministrator({
liveID: uni?.$liveID,
userID: props?.userInfo?.userID,
success: () => {
uni.hideLoading()
uni.showToast({
title: '设置成功',
icon: 'success',
mask: true
})
close()
},
fail: () => {
uni.hideLoading()
}
})
}
}
})
}
const kickOut = () => {
console.log('kick out from room', props?.userInfo?.userID);
const muteSpeak = () => {
console.log(
`mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}`
)
const isShow = props?.userInfo?.isMessageDisabled
uni.showModal({
title: `提示`,
content: isShow ? `确认禁止用户发言?` : `确认恢复用户发言?`,
success: c => {
if (c.confirm) {
const params = {
liveID: uni?.$liveID,
userID: props?.userInfo?.userID,
isDisable: !props?.userInfo?.isMessageDisabled
}
if (isShow) {
disableSendMessage(params)
} else {
disableSendMessage(params)
}
uni.showModal({
content: `确认踢出${props?.userInfo?.userName || props?.userInfo?.userID}吗?`,
success: (res) => {
if (res.confirm) {
kickUserOutOfRoom({
liveID: uni?.$liveID,
userID: props?.userInfo?.userID,
success: () => {
close()
console.log(`kickUserOutOfRoom success`);
},
fail: (errCode, errMsg) => {
console.log(`kickUserOutOfRoom fail errCode: ${errCode}, errMsg: ${errMsg}`);
},
});
}
}
});
};
close()
}
}
})
}
const followUser = () => {
console.warn('== 关注用户 ', userInfo?.userName);
// 这里可以添加关注用户的逻辑
uni.showToast({
title: '关注成功',
icon: 'success'
});
}
const kickOut = () => {
console.log('kick out from room', props?.userInfo?.userID)
uni.showModal({
content: `确认踢出${
props?.userInfo?.userName || props?.userInfo?.userID
}吗?`,
success: res => {
if (res.confirm) {
kickUserOutOfRoom({
liveID: uni?.$liveID,
userID: props?.userInfo?.userID,
success: () => {
close()
console.log(`kickUserOutOfRoom success`)
},
fail: (errCode, errMsg) => {
console.log(
`kickUserOutOfRoom fail errCode: ${errCode}, errMsg: ${errMsg}`
)
}
})
}
}
})
}
const followUser = () => {
console.warn('== 关注用户 ', userInfo?.userName)
// 这里可以添加关注用户的逻辑
uni.showToast({
title: '关注成功',
icon: 'success'
})
}
</script>
<style>
.bottom-drawer-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
top: 0;
z-index: 1000;
}
.bottom-drawer-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
top: 0;
z-index: 1000;
}
.drawer-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
}
.drawer-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
}
.bottom-drawer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(34, 38, 46, 1);
border-top-left-radius: 32rpx;
border-top-right-radius: 32rpx;
transform: translateY(100%);
transition-property: transform;
transition-duration: 0.3s;
transition-timing-function: ease;
height: 400rpx;
flex-direction: column;
}
.bottom-drawer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(34, 38, 46, 1);
border-top-left-radius: 32rpx;
border-top-right-radius: 32rpx;
transform: translateY(100%);
transition-property: transform;
transition-duration: 0.3s;
transition-timing-function: ease;
height: 400rpx;
flex-direction: column;
}
.drawer-open {
transform: translateY(0);
}
.drawer-open {
transform: translateY(0);
}
.drawer-header {
padding: 40rpx 48rpx;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.drawer-header {
padding: 40rpx 48rpx;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.user-info {
display: flex;
flex-direction: row;
align-items: center;
}
.user-info {
display: flex;
flex-direction: row;
align-items: center;
}
.user-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
border-width: 2rpx;
border-color: #ffffff;
margin-right: 20rpx;
}
.user-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
border-width: 2rpx;
border-color: #ffffff;
margin-right: 20rpx;
}
.user-details {
display: flex;
flex-direction: column;
}
.user-details {
display: flex;
flex-direction: column;
}
.name-badge-row {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 8rpx;
}
.name-badge-row {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 8rpx;
}
.user-name {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
margin-right: 16rpx;
}
.user-name {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
margin-right: 16rpx;
}
.badge {
display: flex;
flex-direction: row;
align-items: center;
background-color: #8B5CF6;
padding: 4rpx 12rpx;
border-radius: 16rpx;
}
.badge {
display: flex;
flex-direction: row;
align-items: center;
background-color: #8b5cf6;
padding: 4rpx 12rpx;
border-radius: 16rpx;
}
.badge-icon {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.badge-icon {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.badge-text {
color: #ffffff;
font-size: 24rpx;
font-weight: 500;
}
.badge-text {
color: #ffffff;
font-size: 24rpx;
font-weight: 500;
}
.user-id {
color: rgba(255, 255, 255, 0.7);
font-size: 24rpx;
}
.user-id {
color: rgba(255, 255, 255, 0.7);
font-size: 24rpx;
}
.follow-button {
background-color: #007AFF;
padding: 12rpx 32rpx;
border-radius: 32rpx;
/* height: 64rpx; */
}
.follow-button {
background-color: #007aff;
padding: 12rpx 32rpx;
border-radius: 32rpx;
/* height: 64rpx; */
}
.follow-text {
color: #ffffff;
font-size: 28rpx;
font-weight: 500;
}
.follow-text {
color: #ffffff;
font-size: 28rpx;
font-weight: 500;
}
.drawer-content {
height: 400rpx;
justify-content: flex-start;
padding: 0 48rpx;
}
.drawer-content {
height: 400rpx;
justify-content: flex-start;
padding: 0 48rpx;
}
.drawer-actions {
display: flex;
flex-direction: row;
}
.drawer-actions {
display: flex;
flex-direction: row;
}
.action-btn {
flex-direction: column;
align-items: center;
margin-left: 10rpx;
height: 160rpx;
width: 120rpx
}
.action-btn {
flex-direction: column;
align-items: center;
margin-left: 10rpx;
height: 160rpx;
width: 120rpx;
}
.action-btn-image-container {
width: 100rpx;
height: 100rpx;
background-color: rgba(43, 44, 48, 1);
margin-bottom: 16rpx;
border-radius: 20rpx;
justify-content: center;
align-items: center;
}
.action-btn-image-container {
width: 100rpx;
height: 100rpx;
background-color: rgba(43, 44, 48, 1);
margin-bottom: 16rpx;
border-radius: 20rpx;
justify-content: center;
align-items: center;
}
.action-btn-image {
width: 50rpx;
height: 50rpx;
}
.action-btn-image {
width: 50rpx;
height: 50rpx;
}
.action-btn-content {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.9);
}
.action-btn-content {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.9);
}
.divider-line-container {
height: 68rpx;
justify-content: center;
position: relative;
}
.divider-line-container {
height: 68rpx;
justify-content: center;
position: relative;
}
.divider-line {
width: 268rpx;
height: 10rpx;
border-radius: 200rpx;
background-color: #ffffff;
position: absolute;
bottom: 16rpx;
}
</style>
.divider-line {
width: 268rpx;
height: 10rpx;
border-radius: 200rpx;
background-color: #ffffff;
position: absolute;
bottom: 16rpx;
}
</style>