mirror of https://github.com/halo-dev/halo-admin
fix: token expire (#129)
parent
85e5a64d04
commit
8fd6cd244e
|
@ -13,7 +13,7 @@ const user = {
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_TOKEN: (state, token) => {
|
SET_TOKEN: (state, token) => {
|
||||||
Vue.ls.set(ACCESS_TOKEN, token)
|
Vue.ls.set(ACCESS_TOKEN, token, token ? token.expired_in * 1000 : null)
|
||||||
state.token = token
|
state.token = token
|
||||||
},
|
},
|
||||||
CLEAR_TOKEN: state => {
|
CLEAR_TOKEN: state => {
|
||||||
|
|
Loading…
Reference in New Issue