This commit is contained in:
cbb
2026-02-07 14:13:00 +08:00
parent 8f5999e7fe
commit 0657b0a718
7 changed files with 112 additions and 21 deletions

View File

@@ -173,6 +173,7 @@
'message-tool-out': item.flow === 'out',
'message-tool-in': item.flow === 'in'
}"
:role="userType"
:messageItem="item"
:isMultipleSelectMode="isMultipleSelectMode"
@toggleMultipleSelectMode="
@@ -237,7 +238,8 @@
TUIStore,
StoreName,
TUITranslateService,
TUIChatService
TUIChatService,
TUIGroupService
} from '@tencentcloud/chat-uikit-engine-lite'
import {
setInstanceMapping,
@@ -287,6 +289,7 @@
import { navigateTo } from '../../../../utils/router'
import { useUI } from '../../../../utils/use-ui'
import { useUserStore } from '../../../../stores/user'
import { useAuthUser } from '../../../../composables/useAuthUser'
interface IEmits {
(e: 'closeInputToolBar'): void
@@ -316,6 +319,9 @@
const isOfficial = TUIStore.getData(StoreName.APP, 'isOfficial')
const thisInstance = getCurrentInstance()?.proxy || getCurrentInstance()
const { tencentUserSig } = useAuthUser()
/** 当前用户状态 */
const userType = ref('')
const messageList = ref<IMessageModel[]>()
const multipleSelectedMessageIDList = ref<string[]>([])
const isCompleted = ref(false)
@@ -370,7 +376,7 @@
}
}
onMounted(() => {
onMounted(async () => {
// Retrieve the information about whether the audio has been played from localStorage
audioPlayedMapping.value =
chatStorage.getChatStorage('audioPlayedMapping') || {}
@@ -388,6 +394,20 @@
setInstanceMapping('messageList', thisInstance)
uni.$on('scroll-to-bottom', scrollToLatestMessage)
/**
* isGroup: boolean
groupID: string
isNotInGroup: boolean
*/
if (props.isGroup) {
const res = await TUIGroupService.getGroupMemberProfile({
groupID: props.groupID,
userIDList: [tencentUserSig.value.userId]
})
userType.value = res.data.memberList[0].role
}
})
onUnmounted(() => {