优化企业网站功能

This commit is contained in:
2026-08-20 16:21:07 +08:00
parent 112d60b993
commit 3f0fcb88e7
45 changed files with 8758 additions and 5058 deletions
+46 -6
View File
@@ -3,19 +3,60 @@ import { convertMenusToRoutes } from "./dynamicRoutes";
// 静态子路由:需要在 Main 框架内显示的页面
const staticMainChildren = [
// CMS 文章中心是系统内置功能,不依赖数据库菜单配置。
// 默认首页:访问 / 时直接展示工作台,URL 保持为 /
{
path: "/apps/cms/articles",
path: "",
name: "Dashboard",
component: () => import("@/views/dashboard/index.vue"),
meta: { requiresAuth: true, title: "工作台" }
},
// CMS 文章/产品/解决方案是系统内置功能,不依赖数据库菜单配置。
// 统一结构:index 为列表页,type 为分类页。
{
path: "/apps/cms/article",
name: "CmsArticles",
component: () => import("@/views/apps/cms/articles/index.vue"),
component: () => import("@/views/apps/cms/article/index/index.vue"),
meta: { requiresAuth: true, title: "文章管理", modulePath: "/apps/cms" }
},
{
path: "/apps/cms/articles/category",
path: "/apps/cms/article/type",
name: "CmsArticleCategories",
component: () => import("@/views/apps/cms/articles/category.vue"),
component: () => import("@/views/apps/cms/article/type/index.vue"),
meta: { requiresAuth: true, title: "文章分类", modulePath: "/apps/cms" }
},
{
path: "/apps/cms/products",
name: "CmsProducts",
component: () => import("@/views/apps/cms/product/index/index.vue"),
meta: { requiresAuth: true, title: "产品管理", modulePath: "/apps/cms" }
},
{
path: "/apps/cms/products/types",
name: "CmsProductCategories",
component: () => import("@/views/apps/cms/product/type/index.vue"),
meta: { requiresAuth: true, title: "产品分类", modulePath: "/apps/cms" }
},
{
path: "/apps/cms/solutions",
name: "CmsSolutions",
component: () => import("@/views/apps/cms/solution/index/index.vue"),
meta: { requiresAuth: true, title: "解决方案管理", modulePath: "/apps/cms" }
},
{
path: "/apps/cms/solutions/types",
name: "CmsSolutionCategories",
component: () => import("@/views/apps/cms/solution/type/index.vue"),
meta: { requiresAuth: true, title: "解决方案分类", modulePath: "/apps/cms" }
},
// 兼容旧路径:articles/* -> article/*
{
path: "/apps/cms/articles",
redirect: "/apps/cms/article"
},
{
path: "/apps/cms/articles/category",
redirect: "/apps/cms/article/type"
},
{
path: "/user/userProfile",
name: "userProfile",
@@ -138,7 +179,6 @@ function addDynamicRoutes(menus) {
path: "/",
name: "Main",
component: () => import("@/views/Main.vue"),
redirect: "/dashboard",
meta: { requiresAuth: true },
children: [...staticMainChildren, ...dynamicRoutes] // 合并静态和动态子路由
});