From ad1b1ef223aa37cd51a1d0b8184afd259d7b32fd Mon Sep 17 00:00:00 2001 From: hal-wang Date: Mon, 25 Jan 2021 20:14:44 +0800 Subject: [PATCH] remove useless code --- web/src/router/frpc.js | 32 ++++++++++++++++---------------- web/src/router/index.js | 16 +--------------- web/src/views/frps/Overview.vue | 2 -- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/web/src/router/frpc.js b/web/src/router/frpc.js index 53b0138d..c471c1ad 100644 --- a/web/src/router/frpc.js +++ b/web/src/router/frpc.js @@ -1,21 +1,5 @@ import AdminLayout from '@/components/AdminLayout' const routes = [ - { - path: '/frpc/config', - component: AdminLayout, - meta: { - icon: 'config' - }, - children: [ - { - path: '', - component: () => import('@/views/frpc/Configure'), - meta: { - title: 'Configure' - } - } - ] - }, { path: '/frpc', component: AdminLayout, @@ -31,6 +15,22 @@ const routes = [ } } ] + }, + { + path: '/frpc/config', + component: AdminLayout, + meta: { + icon: 'config' + }, + children: [ + { + path: '', + component: () => import('@/views/frpc/Configure'), + meta: { + title: 'Configure' + } + } + ] } ] diff --git a/web/src/router/index.js b/web/src/router/index.js index 8fb1a2f6..193b6262 100644 --- a/web/src/router/index.js +++ b/web/src/router/index.js @@ -4,7 +4,7 @@ import AdminLayout from '@/components/AdminLayout' Vue.use(Router) -const allRoutes = [ +export const routes = [ { path: '/', component: AdminLayout, @@ -34,20 +34,6 @@ const allRoutes = [ } ] -// filter routes recursively -const filterRoutes = function(routes) { - const newRoutes = routes.filter(route => !!route) - for (const route in newRoutes) { - if (route.children) { - route.children = filterRoutes(route.children) - } - } - return newRoutes -} - -export const routes = filterRoutes(allRoutes) -console.log('allRoutes', allRoutes, routes) - const router = new Router({ routes }) diff --git a/web/src/views/frps/Overview.vue b/web/src/views/frps/Overview.vue index 9f699371..59943166 100644 --- a/web/src/views/frps/Overview.vue +++ b/web/src/views/frps/Overview.vue @@ -82,8 +82,6 @@ export default { methods: { initData() { if (!this.serverInfo) return - console.log('serverInfo', this.serverInfo) - this.version = this.serverInfo.version this.bind_port = this.serverInfo.bind_port this.bind_udp_port = this.serverInfo.bind_udp_port