mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-10 20:36:55 +08:00
allow all gifts rebuy
This commit is contained in:
@@ -14,6 +14,7 @@ import { useRoute } from 'vue-router'
|
||||
import { Vue3Marquee } from 'vue3-marquee'
|
||||
import { NCard, NDivider, NEmpty, NMessageProvider, NSpace, NText, useMessage } from 'naive-ui'
|
||||
import { List } from 'linqts'
|
||||
import { useWebRTC } from '@/store/useRTC'
|
||||
|
||||
const props = defineProps<{
|
||||
id?: number
|
||||
@@ -24,6 +25,7 @@ const route = useRoute()
|
||||
const currentId = computed(() => {
|
||||
return props.id ?? route.query.id
|
||||
})
|
||||
const rtc = await useWebRTC().Init('slave')
|
||||
|
||||
const cardRef = ref()
|
||||
const listContainerRef = ref()
|
||||
@@ -114,6 +116,9 @@ async function update() {
|
||||
}
|
||||
}
|
||||
}
|
||||
async function onAddedItem() {
|
||||
|
||||
}
|
||||
|
||||
const direction = ref<'normal' | 'reverse'>('normal')
|
||||
|
||||
@@ -122,7 +127,11 @@ const active = ref(true)
|
||||
let timer: any
|
||||
onMounted(() => {
|
||||
update()
|
||||
timer = setInterval(update, 2000)
|
||||
timer = setInterval(() => update(), 2000)
|
||||
|
||||
// 接收点播结果消息
|
||||
rtc.on('function.live-request.add', () => update())
|
||||
|
||||
//@ts-expect-error 这里获取不了
|
||||
if (window.obsstudio) {
|
||||
//@ts-expect-error 这里获取不了
|
||||
@@ -141,7 +150,6 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NMessageProvider :to="cardRef" />
|
||||
<div ref="cardRef" class="live-request-background" v-bind="$attrs">
|
||||
<p class="live-request-header">{{ settings.obsTitle ?? '点播' }}</p>
|
||||
<NDivider class="live-request-divider">
|
||||
|
||||
Reference in New Issue
Block a user