Skip to content

Commit

Permalink
{UserStorage}
Browse files Browse the repository at this point in the history
  • Loading branch information
szuprefix committed May 16, 2020
1 parent 6c8d086 commit 370c28d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/store/modules/user.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/**
* Created by denishuang on 2020/5/15.
*/
import UserStorage from '../../utils/user_storage'
import {UserStorage} from '../../utils/user_storage'
import {logout} from '../../utils/auth'
export default {
state: {
storage: UserStorage()
},
mutations: {
setUser (state, payload) {
Object.assign(state, payload)
state.storage = UserStorage(payload.id)
Object.assign(state, payload, {storage: UserStorage(payload.id)})
},
clearUser (state) {
state.user = {}
Expand All @@ -32,4 +31,4 @@ export default {
})
}
}
}
}

0 comments on commit 370c28d

Please sign in to comment.