Files
exchange/resources/assets/js/middleware/auth.js
T
2018-05-07 15:26:23 +08:00

10 lines
166 B
JavaScript

import store from '~/store'
export default async (to, from, next) => {
if (!store.getters['auth/check']) {
next({ name: 'login' })
} else {
next()
}
}