diff --git a/src/utils/sse.ts b/src/utils/sse.ts index 059c8f8..7cbef0b 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -26,6 +26,14 @@ export const initSSE = (url: any) => { watch(data, () => { if (!data.value) return; + + // 打印接收到的 SSE 消息 + console.log('=== SSE 接收到消息 ==='); + console.log('消息内容:', data.value); + console.log('消息类型:', typeof data.value); + console.log('接收时间:', new Date().toLocaleString()); + console.log('====================='); + useNoticeStore().addNotice({ message: data.value, read: false, diff --git a/src/views/login.vue b/src/views/login.vue index 479c6f1..2366181 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -6,7 +6,7 @@
智能安防 · 实时监控 · 高效管理
@@ -80,7 +80,8 @@ import { LoginData, TenantVO } from '@/api/types'; import { to } from 'await-to-js'; import { HttpStatus } from '@/enums/RespEnum'; import { useI18n } from 'vue-i18n'; -import logoUrl from '@/assets/logo/logo.png'; +import logo from '@/assets/logo/logo.png'; +import { getDemo } from '@/api/systemList/index'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -224,6 +225,18 @@ onMounted(() => { initTenantList(); getLoginData(); }); + +// 获取Logo图片 +const logoUrl = ref(); +const logoName = ref(); +onMounted(() => { + getDemo().then((res) => { + console.log('系统11111111111', res); + + logoName.value = res.data.name; + logoUrl.value = res.data.url; + }); +});