🎨 延长 Cookie 失效时间

This commit is contained in:
ronger 2021-08-18 15:54:23 +08:00
parent ff8dda1e8b
commit 6924520390

View File

@ -114,7 +114,7 @@ export default {
_ts.$store.commit('setAuth', auth) // mutating to store for client rendering _ts.$store.commit('setAuth', auth) // mutating to store for client rendering
localStorage.setItem('user', JSON.stringify(user)) localStorage.setItem('user', JSON.stringify(user))
_ts.$store.commit('setUser', user) // mutating to store for client rendering _ts.$store.commit('setUser', user) // mutating to store for client rendering
Cookie.set('auth', auth) Cookie.set('auth', auth, { expires: 7 })
if (_ts.historyUrl) { if (_ts.historyUrl) {
window.location.href = _ts.historyUrl window.location.href = _ts.historyUrl
} else { } else {