This commit is contained in:
张成
2025-10-09 18:17:41 +08:00
parent 366c18bcea
commit ba61c9e45d
63 changed files with 1133 additions and 295 deletions

View File

@@ -10,7 +10,7 @@ export default {
avatorImgPath: '',
token: getToken(),
authorityMenus: [],
menuList: []
menuList: localStorage.getItem('menuList') ? JSON.parse(localStorage.getItem('menuList')) : []
},
mutations: {
setAvator(state, avatorPath) {
@@ -30,6 +30,7 @@ export default {
},
setMenuList(state, menus) {
state.menuList = menus
localStorage.setItem('menuList', JSON.stringify(menus))
}
},
getters: {
@@ -173,6 +174,8 @@ export default {
async handleLogOut({ state, commit }, vue) {
commit('setToken', '')
commit('setAuthorityMenus', '[]')
commit('setMenuList', [])
localStorage.removeItem('menuList')
window.location.reload()
}
}