mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-11 18:32:49 +00:00
12 lines
297 B
TypeScript
12 lines
297 B
TypeScript
|
|
import useAppStore from '@/stores/app'
|
|
|
|
export default defineNuxtRouteMiddleware((to, from) => {
|
|
if (!getToken()) {
|
|
useAppStore().$patch(state => {
|
|
state.route = to.path
|
|
})
|
|
// useLogin().setLoginBack(to)
|
|
// return navigateTo('/auth/login')
|
|
}
|
|
}) |