添加直播间功能,直播间右上角人数需要完善
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
import { useUI } from '../../../utils/use-ui'
|
||||
import { TUIGroupService } from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import { useAuthUser } from '../../../composables/useAuthUser'
|
||||
import { addLiveActivity } from '@/api/tui-kit'
|
||||
import { useBarrageState } from '@/uni_modules/tuikit-atomic-x/state/BarrageState';
|
||||
import { LIVE_BUSINESS } from '@/constants/live-keys'
|
||||
|
||||
|
||||
const { showToast } = useUI()
|
||||
const { tencentUserSig } = useAuthUser()
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
@@ -35,6 +36,9 @@
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const { sendCustomMessage } = useBarrageState(props.roomId);
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
/**
|
||||
@@ -86,12 +90,6 @@
|
||||
})
|
||||
|
||||
const submitForm = async () => {
|
||||
const res = await TUIGroupService.getGroupMemberProfile({
|
||||
groupID: props.groupID,
|
||||
userIDList: [tencentUserSig.value.userId]
|
||||
})
|
||||
|
||||
console.log(res)
|
||||
if (!formData.title) {
|
||||
showToast('请填写标题')
|
||||
return
|
||||
@@ -134,7 +132,18 @@
|
||||
creatorType: props.creatorType,
|
||||
roomId: props.roomId
|
||||
}
|
||||
console.log(data)
|
||||
|
||||
const res = await addLiveActivity(data)
|
||||
sendCustomMessage({
|
||||
liveID: props.roomId,
|
||||
businessID: LIVE_BUSINESS.SIGN,
|
||||
data: JSON.stringify(res.data)
|
||||
});
|
||||
formData.title = ''
|
||||
formData.endTime = ''
|
||||
formData.rewardValue = ''
|
||||
formData.maxParticipants = ''
|
||||
close()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user