This commit is contained in:
2025-08-15 10:58:12 +08:00
parent c7b4af704d
commit ff2f36e88c
6 changed files with 395 additions and 383 deletions

View File

@ -28,24 +28,25 @@ export const initSSE = (url: any) => {
console.log(data.value);
let label = '';
let route1 = '';
let detailId = '';
try {
if (JSON.parse(data.value)) {
const obj = JSON.parse(data.value);
route1 = obj.route;
label = obj.message;
detailId = obj.detailId;
data.value = null;
}
} catch (error) {
label = data.value;
}
console.log(route1);
console.log(label);
// if (!data.value) return;
if (!label) return;
useNoticeStore().addNotice({
message: label,
read: false,
time: new Date().toLocaleString(),
route: route1
route: route1,
detailId: detailId
});
ElNotification({
title: '消息',