From 0228a0b927528c2bb2f1193eb8efcb4f82c75018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sat, 8 Apr 2023 22:24:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96:=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E5=90=8E?= =?UTF-8?q?,=E8=BF=9B=E8=A1=8CWS=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/api/websocket.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/api/websocket.js b/web/src/api/websocket.js index efc5c9c..3ef1022 100644 --- a/web/src/api/websocket.js +++ b/web/src/api/websocket.js @@ -29,10 +29,15 @@ function webSocketOnError (e) { */ function webSocketOnMessage (e) { const data = JSON.parse(e.data) - const { refresh_unread } = data + const { refresh_unread, systemConfig } = data if (refresh_unread) { + // 更新消息通知条数 store.dispatch('d2admin/messagecenter/setUnread') } + if (systemConfig) { + // 更新系统配置 + this.$store.dispatch('d2admin/settings/load') + } if (data.contentType === 'SYSTEM') { ElementUI.Notification({ title: '系统消息',