🐛fix 控制台警告

This commit is contained in:
不做码农 2023-12-19 20:26:36 +08:00
parent 563c757741
commit 09b6a8fb81
2 changed files with 10 additions and 7 deletions

View File

@ -1,14 +1,15 @@
const state = { const state = {
onlineNum: 0, onlineNum: 0,
noticeList: [] noticeList: [],
} }
const mutations = { const mutations = {
SET_ONLINEUSER_NUM: (state, num) => { SET_ONLINEUSER_NUM: (state, data) => {
const { onlineClients, num } = data
state.onlineNum = num state.onlineNum = num
}, },
SET_NOTICE_list: (state, data) => { SET_NOTICE_list: (state, data) => {
state.noticeList = data; state.noticeList = data
} },
} }
const actions = { const actions = {
@ -19,12 +20,12 @@ const actions = {
// 更新系统通知 // 更新系统通知
getNoticeList({ commit }, data) { getNoticeList({ commit }, data) {
commit('SET_NOTICE_list', data) commit('SET_NOTICE_list', data)
} },
} }
export default { export default {
namespaced: true, namespaced: true,
state, state,
mutations, mutations,
actions actions,
} }

View File

@ -82,5 +82,7 @@ export default {
store.dispatch('socket/getNoticeList', data.data) store.dispatch('socket/getNoticeList', data.data)
} }
}) })
connection.on('onlineInfo', () => {})
connection.on('connId', () => {})
}, },
} }