Merge branch 'master' of https://e.coding.net/g-cphe0354/cashier/cashier-web into dwb
This commit is contained in:
@@ -181,27 +181,25 @@ onMounted(() => {
|
||||
// NoticeAPI.getMyNoticePage({ pageNum: 1, pageSize: 5, isRead: 0 }).then((data) => {
|
||||
// notices.value = data.list;
|
||||
// });
|
||||
|
||||
WebSocketManager.subscribeToTopic("/user/queue/message", (message) => {
|
||||
console.log("收到消息:", message);
|
||||
const data = JSON.parse(message);
|
||||
const id = data.id;
|
||||
if (!notices.value.some((notice) => notice.id == id)) {
|
||||
notices.value.unshift({
|
||||
id,
|
||||
title: data.title,
|
||||
type: data.type,
|
||||
publishTime: data.publishTime,
|
||||
});
|
||||
|
||||
ElNotification({
|
||||
title: "您收到一条新的通知消息!",
|
||||
message: data.title,
|
||||
type: "success",
|
||||
position: "bottom-right",
|
||||
});
|
||||
}
|
||||
});
|
||||
// WebSocketManager.subscribeToTopic("/user/queue/message", (message) => {
|
||||
// console.log("收到消息:", message);
|
||||
// const data = JSON.parse(message);
|
||||
// const id = data.id;
|
||||
// if (!notices.value.some((notice) => notice.id == id)) {
|
||||
// notices.value.unshift({
|
||||
// id,
|
||||
// title: data.title,
|
||||
// type: data.type,
|
||||
// publishTime: data.publishTime,
|
||||
// });
|
||||
// ElNotification({
|
||||
// title: "您收到一条新的通知消息!",
|
||||
// message: data.title,
|
||||
// type: "success",
|
||||
// position: "bottom-right",
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
});
|
||||
|
||||
// 阅读通知公告
|
||||
|
||||
Reference in New Issue
Block a user