新增系统通知实时通知给连接的客户端
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
const state = {
|
||||
onlineNum: 0
|
||||
onlineNum: 0,
|
||||
noticeList: []
|
||||
}
|
||||
const mutations = {
|
||||
SET_ONLINEUSER_NUM: (state, num) => {
|
||||
state.onlineNum = num
|
||||
},
|
||||
SET_NOTICE_list: (state, data) => {
|
||||
state.noticeList = data;
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -12,6 +16,10 @@ const actions = {
|
||||
changeOnlineNum({ commit }, data) {
|
||||
commit('SET_ONLINEUSER_NUM', data)
|
||||
},
|
||||
// 更新系统通知
|
||||
getNoticeList({ commit }, data) {
|
||||
commit('SET_NOTICE_list', data)
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user