防爆增加前端手动解锁的功能

This commit is contained in:
wsczx
2024-10-31 10:04:35 +08:00
parent 55d7300033
commit cad74d7fdb
5 changed files with 157 additions and 32 deletions

View File

@@ -1,35 +1,36 @@
import Vue from "vue";
import VueRouter from "vue-router";
import {getToken} from "./token";
import { getToken } from "./token";
Vue.use(VueRouter)
const routes = [
{path: '/login', component: () => import('@/pages/Login')},
{ path: '/login', component: () => import('@/pages/Login') },
{
path: '/admin',
component: () => import('@/layout/Layout'),
redirect: '/admin/home',
children: [
{path: 'home', component: () => import('@/pages/Home')},
{ path: 'home', component: () => import('@/pages/Home') },
{path: 'set/system', component: () => import('@/pages/set/System')},
{path: 'set/soft', component: () => import('@/pages/set/Soft')},
{path: 'set/other', component: () => import('@/pages/set/Other')},
{path: 'set/audit', component: () => import('@/pages/set/Audit')},
{ path: 'set/system', component: () => import('@/pages/set/System') },
{ path: 'set/soft', component: () => import('@/pages/set/Soft') },
{ path: 'set/other', component: () => import('@/pages/set/Other') },
{ path: 'set/audit', component: () => import('@/pages/set/Audit') },
{path: 'user/list', component: () => import('@/pages/user/List')},
{path: 'user/policy', component: () => import('@/pages/user/Policy')},
{path: 'user/online', component: () => import('@/pages/user/Online')},
{path: 'user/ip_map', component: () => import('@/pages/user/IpMap')},
{ path: 'user/list', component: () => import('@/pages/user/List') },
{ path: 'user/policy', component: () => import('@/pages/user/Policy') },
{ path: 'user/online', component: () => import('@/pages/user/Online') },
{ path: 'user/ip_map', component: () => import('@/pages/user/IpMap') },
{ path: 'user/lockmanager', component: () => import('@/pages/user/LockManager') },
{path: 'group/list', component: () => import('@/pages/group/List')},
{ path: 'group/list', component: () => import('@/pages/group/List') },
],
},
{path: '*', redirect: '/admin/home'},
{ path: '*', redirect: '/admin/home' },
]
// 3. 创建 router 实例,然后传 `routes` 配置
@@ -64,7 +65,7 @@ router.beforeEach((to, from, next) => {
}
if (to.path === "/login") {
next({path: '/admin/home'});
next({ path: '/admin/home' });
return;
}