优化请求拦截器里 toLogin 函数

This commit is contained in:
hooray
2021-11-16 17:39:12 +08:00
parent be31ce09e6
commit 2900682fda
+1 -1
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
}
})
}