This commit is contained in:
yj 2025-02-19 16:12:37 +08:00
parent 3fedd96ce3
commit fdceae0c76
3 changed files with 23 additions and 10 deletions

View File

@ -10,6 +10,8 @@
border-radius: 4rpx;
padding: 2rpx;
bottom: 4rpx;
width: calc(100% - 12rpx);
box-sizing: border-box;
&-view {
width: 16rpx;
@ -64,7 +66,9 @@
&-text {
color: white;
font-size: 12rpx;
margin-left: 2rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}

View File

@ -1,7 +1,7 @@
import { GetRoomInfo, GetRoomUser, GetShowUser, GetApplySpeak, PostMuteAll, PostOpenMicr, PostOpenCamera, DeleteRoomManager } from '../../api/meeting/index'
import { GetRoomRtcToken } from '../../api/form/index'
import { agora } from '../../utils/agora'
import { onInvoke, onSignalr, getSignIr, offSignalr } from '../../utils/singlr'
import { onInvoke, onSignalr, getSignIr, offSignalr, onStop } from '../../utils/singlr'
import { role, getStorage } from '../../utils/utils'
import { Message } from 'tdesign-miniprogram';
import * as signalR from "signalr-for-wx";
@ -319,6 +319,13 @@ Page({
}
}, 2000)
})
} else {
this.setData({
currentUser: '',
currentUid: ''
}, () => {
this.getShowUser()
})
}
}
},
@ -428,12 +435,6 @@ Page({
},
startSignalr() {
onSignalr(async (item) => {
if (this.data.isCurrePage) {
const item = this.data.roomUserList.find(row => row.uid === this.data.user.uid)
if (item && !item.isRoomManager) {
return
}
}
const userInfo: any = await getStorage('user')
switch (item.key) {
// 聊天
@ -459,6 +460,7 @@ Page({
setTimeout(() => {
wx.disableAlertBeforeUnload({
complete: () => {
onStop()
wx.navigateBack()
}
})
@ -470,6 +472,7 @@ Page({
setTimeout(() => {
wx.disableAlertBeforeUnload({
complete: () => {
onStop()
wx.navigateBack()
}
})
@ -653,6 +656,9 @@ Page({
item.isRoom = true;
item.isAdmin = role.ID.includes(item.roleId) || item.isRoomManager
item.avatarName = item.userName?.slice(-2)
if (item.uid === this.data.user.uid) {
item.userName = item.userName + '(我)'
}
})
this.setData({
roomUserList: res.data
@ -914,6 +920,7 @@ Page({
case "leaveDialog":
wx.disableAlertBeforeUnload({
complete: () => {
onStop()
wx.navigateBack()
}
})
@ -1068,6 +1075,7 @@ Page({
})
wx.disableAlertBeforeUnload({
complete: () => {
onStop()
wx.navigateBack()
}
})
@ -1079,6 +1087,7 @@ Page({
this.setData({
isReconnec: false
})
onStop()
wx.navigateBack()
}
})

View File

@ -22,7 +22,7 @@
<live-player id="player" src="{{currentUser.src}}" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="contain" muted="{{currentUser.uid === user.uid}}" />
</view>
<view class="meeting-content-video-user">
<view class="meeting-content-video-user-view" style=" background:{{currentUser.roleId === '1' || currentUser.roleId === '3'? '#FDC229' : '#3F51B5' }}">
<view class="meeting-content-video-user-view" wx:if="{{currentUser.roleId === '1' || currentUser.roleId === '3'}}" style=" background:#FDC229">
<image src="/assets/icon9.png" class="meeting-content-video-user-view-image" />
</view>
<image wx:if="{{!currentUser.enableMicr}}" src="/assets/{{currentUser.enableMicr ? 'icon2' : 'icon2-active'}}.png" class="meeting-content-video-user-image" />
@ -42,7 +42,7 @@
<live-player src="{{item.src}}" class="meeting-content-smallvideo-box-view-canvas-play" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="contain" data-uid="{{item.uid}}" bindaudiovolumenotify="playerAudioVolumenotify" wx:else />
</view>
<view class="meeting-content-smallvideo-box-view-user">
<view class="meeting-content-smallvideo-box-view-user-view" style=" background:{{ item.roleId === '1' || item.roleId === '3' ? '#FDC229' : '#3F51B5' }}">
<view class="meeting-content-smallvideo-box-view-user-view" wx:if="{{item.roleId === '1' || item.roleId === '3'}}" style=" background:#FDC229">
<image src="/assets/icon9.png" class="meeting-content-smallvideo-box-view-user-view-image" />
</view>
<image wx:if="{{!item.enableMicr}}" src="/assets/{{item.enableMicr ? 'icon2' : 'icon2-active'}}.png" class="meeting-content-smallvideo-box-view-user-image" />