token null validate

pull/1/head
pnoker 5 years ago
parent 2aa23c3be5
commit 0cd8744e4e

@ -32,7 +32,12 @@ router.beforeEach((to, from, next) => {
if (meta.isAuth !== true) {
next();
} else {
checkTokenValid(getToken()).then(res => {
const token = getToken();
if ('' === token || undefined === token) {
next({path: '/login'});
return;
}
checkTokenValid(token).then(res => {
if (res.ok && store.getters.token.length > 0) {
next();
} else {

Loading…
Cancel
Save