Parcourir la source

fix(news): 修复新闻管理模块路由和菜单配置

runphp il y a 1 mois
Parent
commit
819b5d40ae
2 fichiers modifiés avec 18 ajouts et 51 suppressions
  1. 18 0
      frontend/admin/index.js
  2. 0 51
      frontend/admin/views/router.js

+ 18 - 0
frontend/admin/index.js

@@ -32,6 +32,24 @@ export default {
           icon: 'Document',
           keepAlive: true  // 启用页面缓存
         }
+      },
+      {
+        path: 'article/create',
+        name: 'NewsArticleCreate',
+        component: () => import('./components/article/ArticleEdit.vue'),
+        meta: {
+          title: '新增文章',
+          hidden: true  // 隐藏在菜单中
+        }
+      },
+      {
+        path: 'article/edit/:id',
+        name: 'NewsArticleEdit',
+        component: () => import('./components/article/ArticleEdit.vue'),
+        meta: {
+          title: '编辑文章',
+          hidden: true  // 隐藏在菜单中
+        }
       }
     ]
   },

+ 0 - 51
frontend/admin/views/router.js

@@ -1,51 +0,0 @@
-/**
- * News 插件路由配置
- * 新闻管理系统
- * 
- * @author SixShop Team
- * @version 1.0.0
- */
-
-export default {
-  path: '/news',
-  name: 'News',
-  component: () => import('@/layout/index.vue'),
-  meta: {
-    title: '新闻管理',
-    icon: 'Document',
-    plugin: 'news',
-    priority: 30,
-    version: '1.0.0',
-    author: 'SixShop Team',
-    description: '新闻资讯管理系统'
-  },
-  children: [
-    {
-      path: '',
-      name: 'NewsIndex',
-      component: () => import('./index.vue'),
-      meta: {
-        title: '新闻管理',
-        icon: 'Document'
-      }
-    },
-    {
-      path: 'article/create',
-      name: 'NewsArticleCreate',
-      component: () => import('./components/article/ArticleEdit.vue'),
-      meta: {
-        title: '新增文章',
-        hidden: true
-      }
-    },
-    {
-      path: 'article/edit/:id',
-      name: 'NewsArticleEdit',
-      component: () => import('./components/article/ArticleEdit.vue'),
-      meta: {
-        title: '编辑文章',
-        hidden: true
-      }
-    }
-  ]
-}