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

@@ -86,6 +86,10 @@
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'
import { useUI } from '../../../../utils/use-ui'
import { getUserBanList, getUserAdminList } from '../../../../api'
const { showLoading, hideLoading } = useUI()
const { currentLive } = useLiveListState()
const {
setAdministrator,
@@ -124,6 +128,30 @@
emit('update:modelValue', false)
}
/** 获取禁言列表 */
const getBanList = async () => {
try {
showLoading()
const res = await getUserBanList(uni?.$liveID)
console.log('禁言列表=====', res)
hideLoading()
} catch (err) {
hideLoading()
}
}
/** 获取管理员列表 */
const getAdminList = async () => {
try {
showLoading()
const res = await getUserAdminList(uni?.$liveID)
console.log('管理列表=====', res)
hideLoading()
} catch (err) {
hideLoading()
}
}
/** 设置为管理员 */
const onDdmini = () => {
console.log('====', userData.value)
@@ -159,8 +187,10 @@
const muteSpeak = () => {
console.log(
`mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}`
`${uni?.$liveID} === mute or unMute speak, liveID: ${props.liveID}, isMessageDisabled: ${props?.userInfo?.isMessageDisabled}`
)
getBanList()
const isShow = props?.userInfo?.isMessageDisabled
uni.showModal({
title: `提示`,
@@ -219,6 +249,7 @@
icon: 'success'
})
}
</script>
<style>