|
|
@ -52,8 +52,8 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me |
|
|
|
// 检测是否是根节点,0:代表根节点
|
|
|
|
// 检测是否是根节点,0:代表根节点
|
|
|
|
if (MenuEnum.MENU_0.getValue().equals(menu.getParentId()) && !ReUtil.isMatch(RegexConstants.MATCHER_URL, menu.getPath())) { |
|
|
|
if (MenuEnum.MENU_0.getValue().equals(menu.getParentId()) && !ReUtil.isMatch(RegexConstants.MATCHER_URL, menu.getPath())) { |
|
|
|
menuVo.setComponent("Layout"); |
|
|
|
menuVo.setComponent("Layout"); |
|
|
|
menuVo.setPath("/" + menu.getPath()); |
|
|
|
menuVo.setPath(menu.getPath().startsWith("/") ? menu.getPath() : "/".concat(menu.getPath())); |
|
|
|
String redirect = handleRouteRedirect(menu); |
|
|
|
String redirect = "/".concat(handleRouteRedirect(menu)); |
|
|
|
menuVo.setRedirect(StrUtil.isNotBlank(redirect) ? redirect : MenuEnum.MENU_ROUTE_DEFAULT_URL.getValue()); |
|
|
|
menuVo.setRedirect(StrUtil.isNotBlank(redirect) ? redirect : MenuEnum.MENU_ROUTE_DEFAULT_URL.getValue()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
menuVo.setPath(menu.getPath()); |
|
|
|
menuVo.setPath(menu.getPath()); |
|
|
|