From 00e0dbbf98347b1e47a7e0aedd41baa61f7567ed Mon Sep 17 00:00:00 2001
From: fuyongxin <110568259@qq.com>
Date: Wed, 03 Jun 2026 08:47:03 +0800
Subject: [PATCH] 修改配置nacos,后端gateway端口
---
ruoyi-ui/src/store/modules/permission.js | 31 ++++++++-----------------------
1 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js
index 67760b0..7311f23 100644
--- a/ruoyi-ui/src/store/modules/permission.js
+++ b/ruoyi-ui/src/store/modules/permission.js
@@ -38,9 +38,9 @@
const rdata = JSON.parse(JSON.stringify(res.data))
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
- const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
+ const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
- router.addRoutes(asyncRoutes);
+ router.addRoutes(asyncRoutes)
commit('SET_ROUTES', rewriteRoutes)
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
@@ -82,28 +82,13 @@
function filterChildren(childrenMap, lastRouter = false) {
var children = []
- childrenMap.forEach((el, index) => {
- if (el.children && el.children.length) {
- if (el.component === 'ParentView' && !lastRouter) {
- el.children.forEach(c => {
- c.path = el.path + '/' + c.path
- if (c.children && c.children.length) {
- children = children.concat(filterChildren(c.children, c))
- return
- }
- children.push(c)
- })
- return
- }
+ childrenMap.forEach(el => {
+ el.path = lastRouter ? lastRouter.path + '/' + el.path : el.path
+ if (el.children && el.children.length && el.component === 'ParentView') {
+ children = children.concat(filterChildren(el.children, el))
+ } else {
+ children.push(el)
}
- if (lastRouter) {
- el.path = lastRouter.path + '/' + el.path
- if (el.children && el.children.length) {
- children = children.concat(filterChildren(el.children, el))
- return
- }
- }
- children = children.concat(el)
})
return children
}
--
Gitblit v1.9.3