优化通知公告气泡框显示,SignalR接受消息格式修改
This commit is contained in:
@@ -22,11 +22,11 @@ export default {
|
||||
webNotify({ title: title, body: data })
|
||||
})
|
||||
// 接受系统通知/公告
|
||||
connection.on(MsgType.M004, (data1, data2) => {
|
||||
// if (data.code == 200) {
|
||||
useSocketStore().setUnreadNoticeList(data1)
|
||||
useSocketStore().setReadNoticeList(data2)
|
||||
// }
|
||||
connection.on(MsgType.M004, (data) => {
|
||||
if (data.code == 200) {
|
||||
useSocketStore().setUnreadNoticeList(data.data.unReadNotifications)
|
||||
useSocketStore().setReadNoticeList(data.data.readNotifications)
|
||||
}
|
||||
})
|
||||
// 接受聊天数据
|
||||
connection.on(MsgType.M005, (data) => {
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
connection.invoke('AllReadNotice')
|
||||
},
|
||||
ReadNotice(connection, noticeId) {
|
||||
connection.invoke('ReadNotice', noticeId)
|
||||
connection.invoke('ReadNotice', noticeId.toString())
|
||||
}
|
||||
}
|
||||
const MsgType = {
|
||||
|
||||
Reference in New Issue
Block a user