mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
fix wrong check
This commit is contained in:
@@ -256,3 +256,34 @@ export interface UpdateLiveLotteryUsersModel {
|
||||
resultUsers: OpenLiveLotteryUserInfo[]
|
||||
type: OpenLiveLotteryType
|
||||
}
|
||||
export interface SongRequestInfo {
|
||||
songName: string
|
||||
song?: SongsInfo
|
||||
status: SongRequestStatus
|
||||
from: SongRequestFrom
|
||||
scPrice?: number
|
||||
user?: SongRequestUserInfo
|
||||
createAt: number
|
||||
}
|
||||
export interface SongRequestUserInfo {
|
||||
name: string
|
||||
uId: number
|
||||
guardLevel: number
|
||||
fansMedalLevel: number
|
||||
fansMedalName: string
|
||||
fansMedalWearingStatus: boolean
|
||||
}
|
||||
|
||||
export enum SongRequestFrom {
|
||||
Manual,
|
||||
Danmaku,
|
||||
SC,
|
||||
Web,
|
||||
}
|
||||
|
||||
export enum SongRequestStatus {
|
||||
Waiting,
|
||||
Singing,
|
||||
Finish,
|
||||
Cancel,
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useAccount } from '@/api/account'
|
||||
import { SongRequestInfo } from '@/api/api-models'
|
||||
import DanmakuClient, { AuthInfo, DanmakuInfo, RoomAuthInfo, SCInfo } from '@/data/DanmakuClient'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { onMounted, onUnmounted } from 'vue'
|
||||
import { NList, NTabPane, NTabs, useMessage } from 'naive-ui'
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -15,6 +16,8 @@ const props = defineProps<{
|
||||
code: string | undefined
|
||||
}>()
|
||||
|
||||
const activeSongs = ref<SongRequestInfo[]>([])
|
||||
|
||||
function onGetDanmaku(danmaku: DanmakuInfo) {
|
||||
|
||||
}
|
||||
@@ -23,11 +26,6 @@ function onGetSC(danmaku: SCInfo) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const authInfo = route.query as unknown as AuthInfo
|
||||
if (!authInfo?.Code && !accountInfo.value?.isBiliVerified) {
|
||||
message.warning('你并不是从幻星平台进入此页面, 且本站账号也未进行 Bilibili 账号认证, 此功能将不可用')
|
||||
return
|
||||
}
|
||||
props.client.on('danmaku', onGetDanmaku)
|
||||
props.client.on('sc', onGetSC)
|
||||
})
|
||||
@@ -37,4 +35,16 @@ onUnmounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>开发中...</template>
|
||||
<template>
|
||||
开发中...
|
||||
<NTabs animated>
|
||||
<NTabPane name="list" tab="列表">
|
||||
<NList>
|
||||
|
||||
</NList>
|
||||
</NTabPane>
|
||||
<NTabPane name="history" tab="历史">
|
||||
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
</template>
|
||||
|
||||
@@ -334,7 +334,7 @@ onUnmounted(() => {
|
||||
|
||||
<template>
|
||||
<NLayoutContent style="height: 100vh; padding: 20px">
|
||||
<NResult v-if="code && !accountInfo" status="403" title="403" description="该页面只能从饭贩访问或者注册用户使用" />
|
||||
<NResult v-if="!code && !accountInfo" status="403" title="403" description="该页面只能从幻星平台访问或者注册用户使用" />
|
||||
<template v-else>
|
||||
<NCard>
|
||||
<template #header>
|
||||
|
||||
Reference in New Issue
Block a user