|
@@ -13,6 +13,8 @@ router.beforeEach(async (to, from, next) => {
|
|
|
//已登录
|
|
|
if (to.path === '/login') {
|
|
|
next({ path: '/' });
|
|
|
+ } else if (to.path === '/login/qrcode') {
|
|
|
+ next({ path: '/gesture' });
|
|
|
} else {
|
|
|
next();
|
|
|
}
|
|
@@ -23,7 +25,11 @@ router.beforeEach(async (to, from, next) => {
|
|
|
next();
|
|
|
} else {
|
|
|
// 否则全部重定向到登录页
|
|
|
- next(`/login`);
|
|
|
+ if (to.path === '/gesture') {
|
|
|
+ next(`/login/qrcode`);
|
|
|
+ } else {
|
|
|
+ next(`/login`);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|