-
+
-
+
+
diff --git a/src/views/OpenLiveLayout.vue b/src/views/OpenLiveLayout.vue
index d29c7b8..c3d41e2 100644
--- a/src/views/OpenLiveLayout.vue
+++ b/src/views/OpenLiveLayout.vue
@@ -80,12 +80,16 @@ const menuOptions = [
function renderIcon(icon: unknown) {
return () => h(NIcon, null, { default: () => h(icon as any) })
}
-
+const danmakuClientError = ref()
onMounted(async () => {
authInfo.value = route.query as unknown as AuthInfo
if (authInfo.value?.Code) {
client.value = new DanmakuClient(authInfo.value)
- await client.value.Start()
+ const result = await client.value.Start()
+ if (!result.success) {
+ message.error('无法启动弹幕客户端: ' + result.message)
+ danmakuClientError.value = result.message
+ }
} else {
message.error('你不是从幻星平台访问此页面, 或未提供对应参数, 无法使用此功能')
}
@@ -159,6 +163,9 @@ onUnmounted(() => {
+
+ {{ danmakuClientError }}
+
diff --git a/src/views/manage/DanmakuLayout.vue b/src/views/manage/DanmakuLayout.vue
new file mode 100644
index 0000000..7666f73
--- /dev/null
+++ b/src/views/manage/DanmakuLayout.vue
@@ -0,0 +1,35 @@
+
+
+
+ 尚未进行Bilibili认证
+
+
+
+
+
diff --git a/src/views/manage/LotteryView.vue b/src/views/manage/LotteryView.vue
index 8e6093a..a269574 100644
--- a/src/views/manage/LotteryView.vue
+++ b/src/views/manage/LotteryView.vue
@@ -66,7 +66,7 @@ const lotteryHistory = useStorage('LotteryHistory', [])
const message = useMessage()
const notification = useNotification()
-const token = ref()
+const token = ref('')
const turnstile = ref()
const defaultOption = {
resultCount: 1,
diff --git a/src/views/open_live/OpenLiveIndex.vue b/src/views/open_live/OpenLiveIndex.vue
index 6ccfe1a..cb4655f 100644
--- a/src/views/open_live/OpenLiveIndex.vue
+++ b/src/views/open_live/OpenLiveIndex.vue
@@ -22,7 +22,7 @@ const accountInfo = useAccount()
- 通过弹幕或者SC进行点歌, 注册后可以保存和导出 (开发中
+ 通过弹幕或者SC进行点歌, 注册后可以保存和导出 (这个是歌势用的点歌, 不是拿来放歌的那种!)
前往使用
@@ -30,7 +30,7 @@ const accountInfo = useAccount()
- 当浏览器在后台运行时定时器和 Websocket 连接将受到严格限制, 这会导致弹幕接收功能无法正常工作 (详见
+ 当浏览器在后台运行时, 定时器和 Websocket 连接将受到严格限制, 这会导致弹幕接收功能无法正常工作 (详见
此文章), 虽然本站已经针对此问题做出了处理, 一般情况下即使掉线了也会重连,
不过还是有可能会遗漏事件
diff --git a/src/views/open_live/OpenLottery.vue b/src/views/open_live/OpenLottery.vue
index 3381c16..532d1b9 100644
--- a/src/views/open_live/OpenLottery.vue
+++ b/src/views/open_live/OpenLottery.vue
@@ -317,10 +317,8 @@ onMounted(async () => {
message.info('从历史记录中加载 ' + users.length + ' 位用户')
}
}
- if (props.client) {
- props.client.on('danmaku', onDanmaku)
- props.client.on('gift', onGift)
- }
+ props.client?.on('danmaku', onDanmaku)
+ props.client?.on('gift', onGift)
timer = setInterval(updateUsers, 1000 * 10)
})
onUnmounted(() => {