mdf:个人中心页面
This commit is contained in:
@@ -9,6 +9,7 @@ const getters = {
|
||||
cachedViews: state => state.tagsView.cachedViews,
|
||||
roles: state => state.user.roles,
|
||||
user: state => state.user.user,
|
||||
depts: state => state.user.depts,
|
||||
loadMenus: state => state.user.loadMenus,
|
||||
permission_routers: state => state.permission.routers,
|
||||
addRouters: state => state.permission.addRouters,
|
||||
|
||||
@@ -20,6 +20,9 @@ const user = {
|
||||
SET_ROLES: (state, roles) => {
|
||||
state.roles = roles
|
||||
},
|
||||
SET_DEPTS: (state, depts) => {
|
||||
state.depts = depts
|
||||
},
|
||||
SET_LOAD_MENUS: (state, loadMenus) => {
|
||||
state.loadMenus = loadMenus
|
||||
}
|
||||
@@ -91,6 +94,9 @@ export const setUserInfo = (res, commit) => {
|
||||
} else {
|
||||
commit('SET_ROLES', res.roles)
|
||||
}
|
||||
if (res.depts && res.roles.length > 0) {
|
||||
commit('SET_DEPTS', res.depts)
|
||||
}
|
||||
commit('SET_USER', res.user)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user