From 1f3116f402907f06ac3c08a51e7ce860917c8f36 Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Thu, 20 Oct 2022 16:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AFgzip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/router/index.js | 3 + .../modules/myAgent/CompetencyApplication.vue | 6 +- .../myAgent/demo/competency-application.vue | 36 +++++------ front/package.json | 1 + front/public/index.html | 4 +- front/vue.config.js | 59 +++++++++++++------ 6 files changed, 68 insertions(+), 41 deletions(-) diff --git a/back/src/router/index.js b/back/src/router/index.js index 08f69ea5..299a5852 100644 --- a/back/src/router/index.js +++ b/back/src/router/index.js @@ -105,6 +105,7 @@ router.beforeEach((to, from, next) => { return next({ name: 'login' }) } window.SITE_CONFIG.menuList = res.data.filter(item => item.site === 0) + debugger fnAddDynamicMenuRoutes(window.SITE_CONFIG.menuList) next({ ...to, replace: true }) }).catch(() => { @@ -137,6 +138,7 @@ function fnCurrentRouteIsPageRoute (route, pageRoutes = []) { */ function fnAddDynamicMenuRoutes (menuList = [], routes = []) { var temp = [] + debugger for (var i = 0; i < menuList.length; i++) { if (menuList[i].children && menuList[i].children.length >= 1) { temp = temp.concat(menuList[i].children) @@ -187,6 +189,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) { }, { path: '*', redirect: { name: '404' } } ]) + console.log('查询路由', routes) window.SITE_CONFIG.dynamicMenuRoutes = routes window.SITE_CONFIG.dynamicMenuRoutesHasAdded = true } diff --git a/back/src/views/modules/myAgent/CompetencyApplication.vue b/back/src/views/modules/myAgent/CompetencyApplication.vue index 8c8118c9..40398630 100644 --- a/back/src/views/modules/myAgent/CompetencyApplication.vue +++ b/back/src/views/modules/myAgent/CompetencyApplication.vue @@ -1,8 +1,8 @@