📅  最后修改于: 2022-03-11 14:56:54.805000             🧑  作者: Mango
export default function ({ store /*, ssrContext */ }) {
// ...
Router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requireAuth) && !store.getters['auth/isSignedIn']) {
next({ name: 'account-signin', query: { next: to.fullPath } })
} else {
next()
}
})
// ...
}