| | |
| | | queryString = webPath.substring(index); |
| | | } |
| | | |
| | | String[] pathSegments = pathOnly.split("/"); |
| | | String lastSegment = ""; |
| | | for (int i = pathSegments.length - 1; i >= 0; i--) { |
| | | if (StringUtils.isNotEmpty(pathSegments[i])) { |
| | | lastSegment = pathSegments[i]; |
| | | break; |
| | | } |
| | | String lastSegment; |
| | | int lastSlashIndex = pathOnly.lastIndexOf("/"); |
| | | if (lastSlashIndex != -1) { |
| | | lastSegment = pathOnly.substring(lastSlashIndex + 1); |
| | | } else { |
| | | lastSegment = pathOnly; |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(lastSegment)) { |
| | |
| | | SysMenu menu = sysMenuMapper.selectMenuByPath(lastSegment); |
| | | |
| | | if (menu != null && StringUtils.isNotEmpty(menu.getAppComponent())) { |
| | | String appComponent = menu.getAppComponent(); |
| | | if (appComponent.startsWith("/")) { |
| | | appComponent = appComponent.substring(1); |
| | | String appPath = menu.getAppComponent(); |
| | | |
| | | if (appPath.startsWith("/")) { |
| | | appPath = appPath.substring(1); |
| | | } |
| | | return appComponent + queryString; |
| | | |
| | | // 拼接 Web 端原始参数并返回 |
| | | return appPath + queryString; |
| | | } |
| | | |
| | | return DEFAULT_APP_PAGE; |