版本1
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
const getters = {
|
||||
sidebar: state => state.app.sidebar,
|
||||
size: state => state.app.size,
|
||||
device: state => state.app.device,
|
||||
visitedViews: state => state.tagsView.visitedViews,
|
||||
cachedViews: state => state.tagsView.cachedViews,
|
||||
token: state => state.user.token,
|
||||
avatar: state => state.user.avatar,
|
||||
name: state => state.user.name,
|
||||
userId: state => state.user.userInfo.userId,
|
||||
introduction: state => state.user.introduction,
|
||||
roles: state => state.user.roles,
|
||||
permissions: state => state.user.permissions,
|
||||
permission_routes: state => state.permission.routes,
|
||||
userinfo: state => state.user.userInfo,
|
||||
topbarRouters: state => state.permission.topbarRouters,
|
||||
defaultRoutes: state => state.permission.defaultRoutes,
|
||||
sidebarRouters: state => state.permission.sidebarRouters,
|
||||
onlineUserNum: state => state.socket.onlineNum,
|
||||
noticeList: state => state.socket.noticeList
|
||||
sidebar: (state) => state.app.sidebar,
|
||||
size: (state) => state.app.size,
|
||||
device: (state) => state.app.device,
|
||||
visitedViews: (state) => state.tagsView.visitedViews,
|
||||
cachedViews: (state) => state.tagsView.cachedViews,
|
||||
token: (state) => state.user.token,
|
||||
avatar: (state) => state.user.avatar,
|
||||
name: (state) => state.user.name,
|
||||
userId: (state) => state.user.userInfo.userId,
|
||||
introduction: (state) => state.user.introduction,
|
||||
roles: (state) => state.user.roles,
|
||||
permissions: (state) => state.user.permissions,
|
||||
permission_routes: (state) => state.permission.routes,
|
||||
userinfo: (state) => state.user.userInfo,
|
||||
topbarRouters: (state) => state.permission.topbarRouters,
|
||||
defaultRoutes: (state) => state.permission.defaultRoutes,
|
||||
sidebarRouters: (state) => state.permission.sidebarRouters,
|
||||
onlineUserNum: (state) => state.socket.onlineNum,
|
||||
noticeList: (state) => state.socket.noticeList,
|
||||
counterList: (state) => state.socket.counter,
|
||||
}
|
||||
export default getters
|
||||
export default getters
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
const state = {
|
||||
onlineNum: 0,
|
||||
noticeList: []
|
||||
noticeList: [],
|
||||
counter:0
|
||||
|
||||
}
|
||||
const mutations = {
|
||||
SET_ONLINEUSER_NUM: (state, num) => {
|
||||
@@ -8,7 +10,10 @@ const mutations = {
|
||||
},
|
||||
SET_NOTICE_list: (state, data) => {
|
||||
state.noticeList = data;
|
||||
}
|
||||
},
|
||||
SET_GetCache: (state, data) => {
|
||||
state.counter = data;
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -19,9 +24,17 @@ const actions = {
|
||||
// 更新系统通知
|
||||
getNoticeList({ commit }, data) {
|
||||
commit('SET_NOTICE_list', data)
|
||||
},
|
||||
|
||||
//更新缺陷点击
|
||||
GetCache({commit},data){
|
||||
commit("SET_GetCache",data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
|
||||
Reference in New Issue
Block a user