搜索:判断某个成员是不是禁言

This commit is contained in:
cbb
2026-02-12 17:51:42 +08:00
parent a040b56c74
commit 2191f46317
16 changed files with 388 additions and 212 deletions

View File

@@ -255,8 +255,10 @@
deleteImGroup,
quitImGroup
} from '../../../../api/tui-kit'
import { useAuthUser } from '../../../../composables/useAuthUser'
const { showLoading, hideLoading, showDialog } = useUI()
const { tencentUserSig } = useAuthUser()
const TUIGroupServer = Server.getInstance()
const TUIConstants = TUIGroupServer.constants
@@ -307,7 +309,7 @@
const delDialogShow = ref(false)
const groupMemberList = ref<IGroupMember[]>([])
const deletedUserList = ref([])
const currentGroup = ref<IGroupModel>()
const currentGroup = ref<any>()
const currentSelfRole = ref('')
const groupIDValue = ref<string>('')
const groupMemberOffset = ref<number | string>(0)
@@ -324,10 +326,20 @@
})
})
/** 更新用户群状态 */
const setUserAudioPlayed = async (group: any) => {
const res = await TUIGroupService.getGroupMemberProfile({
groupID: group.groupID,
userIDList: [tencentUserSig.value.userId]
})
currentGroup.value = group
currentGroup.value.selfInfo.role = res.data.memberList[0].role
}
TUIStore.watch(StoreName.GRP, {
currentGroup: (group: IGroupModel) => {
if (group) {
currentGroup.value = group
setUserAudioPlayed(group)
currentSelfRole.value = currentGroup.value?.selfInfo?.role
}
},
@@ -393,7 +405,11 @@
const isAdmin = computed(() => {
const userRole = currentGroup.value?.selfInfo?.role
return userRole === TUIChatEngine.TYPES.GRP_MBR_ROLE_OWNER
return [
TUIChatEngine.TYPES.GRP_MBR_ROLE_OWNER,
TUIChatEngine.TYPES.GRP_MBR_ROLE_ADMIN
].includes(userRole)
})
const isWorkGroup = computed(() => {
@@ -749,9 +765,8 @@
switch (transferType.value) {
case 'add':
try {
imMemberResponse = await TUIGroupService.getGroupMemberProfile(
options
)
imMemberResponse =
await TUIGroupService.getGroupMemberProfile(options)
transferList.value = transferList.value.filter(
(item: any) => item.userID !== imResponse.data[0]?.userID
)
@@ -777,9 +792,8 @@
break
case 'remove':
try {
imResponse = await TUIGroupService.getGroupMemberProfile(
options
)
imResponse =
await TUIGroupService.getGroupMemberProfile(options)
if (imResponse.data.memberList.length === 0) {
const message = TUITranslateService.t(
'TUIGroup.该用户不在群组内'