This commit is contained in:
2023-12-23 21:33:16 +08:00
parent 81d5e7b111
commit 19f6259c78
6 changed files with 83 additions and 147 deletions

View File

@@ -8,15 +8,8 @@ export default new Vuex.Store({
theme:'dark',
// 存储token
Authorization: localStorage.getItem('Authorization') ? localStorage.getItem('Authorization') : '',
isLogin:'0',
},
getters: {
getStorage(state){ // 获取本地存储的登录信息
if(!state.Authorization){
state.Authorization =JSON.parse(localStorage.getItem(key))
}
return state.Authorization
}
},
mutations: {
SET_THEME:(state,data)=>{