优化backend产品和解决方案
This commit is contained in:
@@ -160,11 +160,13 @@ export function convertMenusToRoutes(menus, parentPath = '') {
|
||||
} else if (hasChildren) {
|
||||
route.component = () => import('@/views/layouts/EmptyLayout.vue');
|
||||
route.children = convertMenusToRoutes(menu.children, fullPath);
|
||||
const firstChild = menu.children[0];
|
||||
if (firstChild && firstChild.path) {
|
||||
const childFullPath = firstChild.path.startsWith('/')
|
||||
? firstChild.path
|
||||
: `${fullPath}/${firstChild.path}`;
|
||||
const defaultChild = menu.children.find((child) =>
|
||||
child.path === '/apps/cms/analytics/content' || child.path === 'analytics/content'
|
||||
) || menu.children[0];
|
||||
if (defaultChild && defaultChild.path) {
|
||||
const childFullPath = defaultChild.path.startsWith('/')
|
||||
? defaultChild.path
|
||||
: `${fullPath}/${defaultChild.path}`;
|
||||
route.redirect = childFullPath;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -12,6 +12,12 @@ const staticMainChildren = [
|
||||
},
|
||||
// CMS 文章/产品/解决方案是系统内置功能,不依赖数据库菜单配置。
|
||||
// 统一结构:index 为列表页,type 为分类页。
|
||||
{
|
||||
path: "/apps/cms/analytics/content",
|
||||
name: "CmsContentAnalytics",
|
||||
component: () => import("@/views/apps/cms/analytics/content/index.vue"),
|
||||
meta: { requiresAuth: true, title: "内容统计", modulePath: "/apps/cms" }
|
||||
},
|
||||
{
|
||||
path: "/apps/cms/article",
|
||||
name: "CmsArticles",
|
||||
|
||||
Reference in New Issue
Block a user