check token before redirect
This commit is contained in:
parent
3fdfa20f05
commit
94ca13ad95
@ -1,4 +1,6 @@
|
|||||||
export default function ({ store, redirect }) {
|
export default async function ({ store, redirect }) {
|
||||||
|
await store.dispatch('auth/inspectToken')
|
||||||
|
|
||||||
if (!store.state.auth.isLogin) {
|
if (!store.state.auth.isLogin) {
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user