mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-21 01:53:23 +00:00
frontend: Fix router guard
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
@@ -31,16 +31,6 @@ const router = new VueRouter({
|
||||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.path === '/rtty' && to.query.devid) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
if (to.path === '/' && to.query.id) {
|
||||
router.push({path: '/rtty', query: {devid: to.query.id, username: to.query.username, password: to.query.password}});
|
||||
return;
|
||||
}
|
||||
|
||||
if (to.path !== '/login' && !sessionStorage.getItem('rtty-sid')) {
|
||||
router.push('/login');
|
||||
return;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user