refactor: 重构异常处理

This commit is contained in:
张传龙
2022-06-17 22:44:32 +08:00
parent f0b6ce7d20
commit ae43ffb94f
6 changed files with 67 additions and 71 deletions

8
src/utils/auth.js Normal file
View File

@@ -0,0 +1,8 @@
import { router } from '@/router'
export function toLogin() {
router.replace({
path: '/login',
query: { ...router.currentRoute.query, redirect: router.currentRoute.path },
})
}