|
|
|
@ -38,7 +38,6 @@ export const fetchPermissionListByUserId = async (userId) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
|
tokenInterval: null,
|
|
|
|
|
loginStatus: 0,
|
|
|
|
|
defaltRoute: '',
|
|
|
|
|
currentUser: {
|
|
|
|
@ -119,10 +118,9 @@ const useAuthStore = create(devtools((set, get) => ({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
logout: () => {
|
|
|
|
|
const { tokenInterval, currentUser } = get()
|
|
|
|
|
const { currentUser } = get()
|
|
|
|
|
const { clearStorage } = usingStorage()
|
|
|
|
|
clearStorage()
|
|
|
|
|
clearInterval(tokenInterval)
|
|
|
|
|
set(() => ({
|
|
|
|
|
...initialState,
|
|
|
|
|
currentUser: {
|
|
|
|
|