新增signalR连接

This commit is contained in:
不做码农
2022-02-27 21:11:46 +08:00
parent 2a84f7d322
commit 748b9065db
15 changed files with 259 additions and 61 deletions

View File

@@ -0,0 +1,22 @@
const state = {
onlineNum: 0
}
const mutations = {
SET_ONLINEUSER_NUM: (state, num) => {
state.onlineNum = num
},
}
const actions = {
//更新在线人数
changeOnlineNum({ commit }, data) {
commit('SET_ONLINEUSER_NUM', data)
},
}
export default {
namespaced: true,
state,
mutations,
actions
}