diff --git a/src/api/yInfo/yInfo.js b/src/api/yInfo/yInfo.js index d07fa72..d443bf5 100644 --- a/src/api/yInfo/yInfo.js +++ b/src/api/yInfo/yInfo.js @@ -17,3 +17,5 @@ export function getUnread(query) { return request({ url: '/yInfo/getUnread', method: 'GET', params: data }) } +export const ws = '/api/monitor/ws' + diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 45d89bb..612216b 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -19,6 +19,9 @@ const mutations = { Cookies.set('sidebarStatus', 0) } }, + SET_SYSMESSAGE_COUNT: (state, count) => { + state.sysMessageCount = count; + }, CLOSE_SIDEBAR: (state, withoutAnimation) => { Cookies.set('sidebarStatus', 0) state.sidebar.opened = false @@ -40,6 +43,9 @@ const actions = { closeSideBar({ commit }, { withoutAnimation }) { commit('CLOSE_SIDEBAR', withoutAnimation) }, + setSysMessageCount({ commit }, count) { + commit("SET_SYSMESSAGE_COUNT", count); + }, toggleDevice({ commit }, device) { commit('TOGGLE_DEVICE', device) }, diff --git a/src/views/index.vue b/src/views/index.vue index a6e1481..ecb02e6 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -168,12 +168,15 @@