优化请求拦截器里 toLogin 函数

This commit is contained in:
hooray 2021-11-16 17:39:07 +08:00
parent f2db545457
commit d45d5c4c8d

View File

@ -8,7 +8,7 @@ const toLogin = () => {
router.push({
path: '/login',
query: {
redirect: router.currentRoute.fullPath
redirect: router.currentRoute.value.path !== '/login' ? router.currentRoute.value.fullPath : undefined
}
})
}