2022-12-14 18:34:45 +08:00
|
|
|
/*
|
|
|
|
|
* @Author: Kane
|
|
|
|
|
* @Date: 2022-12-14 15:12:46
|
|
|
|
|
* @LastEditors: Kane
|
2023-01-06 18:08:18 +08:00
|
|
|
* @LastEditTime: 2023-01-06 16:44:57
|
2022-12-14 18:34:45 +08:00
|
|
|
* @FilePath: \admin_system\src\router\index.js
|
2023-01-06 18:08:18 +08:00
|
|
|
* @Description: 定义应用路由配置
|
2022-12-14 18:34:45 +08:00
|
|
|
*
|
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
|
|
|
*/
|
2023-01-05 13:18:28 +08:00
|
|
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
2022-12-14 15:23:07 +08:00
|
|
|
|
|
|
|
|
const routes = [
|
2023-01-06 18:08:18 +08:00
|
|
|
//框架路由
|
2022-12-14 15:23:07 +08:00
|
|
|
{
|
2022-12-14 18:34:45 +08:00
|
|
|
path: "/",
|
2023-01-05 13:18:28 +08:00
|
|
|
name: "Root",
|
|
|
|
|
redirect: "Home",
|
2023-01-05 22:26:40 +08:00
|
|
|
hidden: true,
|
2022-12-14 15:23:07 +08:00
|
|
|
},
|
|
|
|
|
{
|
2022-12-14 18:34:45 +08:00
|
|
|
path: "/login",
|
|
|
|
|
name: "Login",
|
|
|
|
|
component: () => import("../views/account/Login.vue"),
|
2023-01-05 22:26:40 +08:00
|
|
|
hidden: true,
|
2023-01-05 13:18:28 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/home",
|
|
|
|
|
name: "Home",
|
2023-01-06 18:08:18 +08:00
|
|
|
hidden: true,
|
2023-01-05 22:26:40 +08:00
|
|
|
meta: {
|
|
|
|
|
title: "控制台"
|
|
|
|
|
},
|
2023-01-06 18:08:18 +08:00
|
|
|
component: () => import("../layout/Index.vue"),
|
|
|
|
|
},
|
|
|
|
|
//侧边导航栏路由
|
|
|
|
|
{ //首页
|
|
|
|
|
path: "/console",
|
|
|
|
|
name: "Console",
|
|
|
|
|
meta: {
|
|
|
|
|
title: "总览"
|
|
|
|
|
},
|
2023-01-05 22:26:40 +08:00
|
|
|
children: [
|
|
|
|
|
{
|
2023-01-06 18:08:18 +08:00
|
|
|
path: "/desktop",
|
|
|
|
|
name: "DeskTop",
|
|
|
|
|
meta: {
|
|
|
|
|
title: "工作台"
|
2023-01-05 22:26:40 +08:00
|
|
|
},
|
2023-01-06 18:08:18 +08:00
|
|
|
component: () => import("../views/overview/OverView.vue"),
|
2023-01-05 22:26:40 +08:00
|
|
|
},
|
|
|
|
|
],
|
2023-01-05 13:18:28 +08:00
|
|
|
component: () => import("../layout/Index.vue"),
|
2023-01-05 22:26:40 +08:00
|
|
|
},
|
2023-01-06 18:08:18 +08:00
|
|
|
{//信息管理
|
2023-01-05 22:26:40 +08:00
|
|
|
path: "/news",
|
|
|
|
|
name: "News",
|
|
|
|
|
meta: {
|
|
|
|
|
title: "信息管理",
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: "/newsIndex",
|
|
|
|
|
name: "NewsIndex",
|
2023-01-06 18:08:18 +08:00
|
|
|
meta: {
|
2023-01-05 22:26:40 +08:00
|
|
|
title: "信息列表"
|
|
|
|
|
},
|
2023-01-06 18:08:18 +08:00
|
|
|
component: () => import("../views/news/News.vue"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/newsIndex",
|
|
|
|
|
name: "NewsIndex",
|
|
|
|
|
meta: {
|
|
|
|
|
title: "信息编辑"
|
|
|
|
|
},
|
|
|
|
|
component: () => import("../views/news/News.vue"),
|
2023-01-05 22:26:40 +08:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
component: () => import("../layout/Index.vue"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: "/user",
|
|
|
|
|
name: "User",
|
|
|
|
|
meta: {
|
|
|
|
|
title: "人员管理",
|
|
|
|
|
},
|
|
|
|
|
component: () => import("../layout/Index.vue"),
|
|
|
|
|
},
|
2022-12-14 18:34:45 +08:00
|
|
|
];
|
2022-12-14 15:23:07 +08:00
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
|
routes
|
2023-01-05 13:18:28 +08:00
|
|
|
});
|
2022-12-14 15:23:07 +08:00
|
|
|
|
2023-01-05 13:18:28 +08:00
|
|
|
export default router;
|