2024-09-13 16:34:15 +08:00
|
|
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
const constantRoutes = [
|
|
|
|
|
{
|
|
|
|
|
path: '/login',
|
|
|
|
|
name: 'Login',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'Login' },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/login/login.vue'),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
path: '/404',
|
|
|
|
|
component: () => import('@/views/error-page/404.vue'),
|
|
|
|
|
hidden: true,
|
|
|
|
|
},
|
2024-09-19 10:46:07 +08:00
|
|
|
{
|
|
|
|
|
path: '/oauth/:code',
|
|
|
|
|
component: () => import('@/views/oauth/login.vue'),
|
|
|
|
|
hidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/oauth/bind/:code',
|
|
|
|
|
component: () => import('@/views/oauth/bind.vue'),
|
|
|
|
|
hidden: true,
|
|
|
|
|
},
|
2024-09-13 16:34:15 +08:00
|
|
|
]
|
|
|
|
|
export const asyncRoutes = [
|
|
|
|
|
// {
|
|
|
|
|
// path: '/',
|
|
|
|
|
// name: 'Index',
|
|
|
|
|
// redirect: '/Home',
|
|
|
|
|
// meta: { title: '首页', icon: 'house' },
|
|
|
|
|
// component: () => import('@/layout/index.vue'),
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// path: '/Home',
|
|
|
|
|
// name: 'Home',
|
|
|
|
|
// meta: { title: '首页', icon: 'house' },
|
|
|
|
|
// component: () => import('@/views/index/index.vue'),
|
|
|
|
|
// },
|
|
|
|
|
//
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
path: '/my',
|
|
|
|
|
name: 'My',
|
2024-09-19 10:46:07 +08:00
|
|
|
redirect: '/my/info',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'My', icon: 'UserFilled' },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/layout/index.vue'),
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
2024-09-19 10:46:07 +08:00
|
|
|
name: 'MyInfo',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'Info', icon: 'User' /*keepAlive: true*/ },
|
2024-09-19 10:46:07 +08:00
|
|
|
component: () => import('@/views/my/info.vue'),
|
|
|
|
|
},
|
2024-10-28 14:25:41 +08:00
|
|
|
{
|
|
|
|
|
path: 'address_book_collection',
|
|
|
|
|
name: 'MyAddressBookCollection',
|
|
|
|
|
meta: { title: 'AddressBookName', icon: 'Collection' /*keepAlive: true*/ },
|
|
|
|
|
component: () => import('@/views/my/address_book/collection.vue'),
|
|
|
|
|
},
|
2024-09-19 10:46:07 +08:00
|
|
|
{
|
|
|
|
|
path: 'address_book',
|
2024-09-13 16:34:15 +08:00
|
|
|
name: 'MyAddressBookList',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'AddressBooks', icon: 'Notebook' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/my/address_book/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-09-19 10:46:07 +08:00
|
|
|
path: 'tag',
|
2024-09-13 16:34:15 +08:00
|
|
|
name: 'MyTagList',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'Tags', icon: 'CollectionTag' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/my/tag/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/user',
|
|
|
|
|
name: 'User',
|
|
|
|
|
redirect: '/user/index',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'System', icon: 'Setting' },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/layout/index.vue'),
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'peer',
|
|
|
|
|
name: 'Peer',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'PeerManage', icon: 'Monitor' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/peer/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'group',
|
|
|
|
|
name: 'UserGroup',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'GroupManage', icon: 'ChatRound' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/group/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'index',
|
|
|
|
|
name: 'UserList',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'UserManage', icon: 'User' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/user/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'add',
|
|
|
|
|
name: 'UserAdd',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'UserAdd', hide: true },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/user/edit.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'edit/:id',
|
|
|
|
|
name: 'UserEdit',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'UserEdit', hide: true },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/user/edit.vue'),
|
|
|
|
|
},
|
2024-10-28 14:25:41 +08:00
|
|
|
{
|
|
|
|
|
path: 'addressBookName',
|
|
|
|
|
name: 'UserAddressBookName',
|
|
|
|
|
meta: { title: 'AddressBookNameManage', icon: 'Collection' /*keepAlive: true*/ },
|
|
|
|
|
component: () => import('@/views/address_book/collection.vue'),
|
|
|
|
|
},
|
2024-09-13 16:34:15 +08:00
|
|
|
{
|
|
|
|
|
path: 'addressBook',
|
|
|
|
|
name: 'UserAddressBook',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'AddressBookManage', icon: 'Notebook' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/address_book/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'tag',
|
|
|
|
|
name: 'UserTag',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'TagsManage', icon: 'CollectionTag' /*keepAlive: true*/ },
|
2024-09-13 16:34:15 +08:00
|
|
|
component: () => import('@/views/tag/index.vue'),
|
|
|
|
|
},
|
2024-09-19 10:46:07 +08:00
|
|
|
{
|
|
|
|
|
path: '/oauth',
|
|
|
|
|
name: 'Oauth',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'OauthManage', icon: 'Link' /*keepAlive: true*/ },
|
2024-09-19 10:46:07 +08:00
|
|
|
component: () => import('@/views/oauth/index.vue'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/loginLog',
|
|
|
|
|
name: 'LoginLog',
|
2024-09-25 22:24:16 +08:00
|
|
|
meta: { title: 'LoginLog', icon: 'List' /*keepAlive: true*/ },
|
2024-09-19 10:46:07 +08:00
|
|
|
component: () => import('@/views/login/log.vue'),
|
|
|
|
|
},
|
2024-10-18 15:01:39 +08:00
|
|
|
{
|
|
|
|
|
path: '/auditConn',
|
|
|
|
|
name: 'AuditConn',
|
|
|
|
|
meta: { title: 'AuditConnLog', icon: 'Tickets' /*keepAlive: true*/ },
|
|
|
|
|
component: () => import('@/views/audit/connList.vue'),
|
|
|
|
|
},
|
2024-10-21 21:07:11 +08:00
|
|
|
{
|
|
|
|
|
path: '/auditFile',
|
|
|
|
|
name: 'AuditFile',
|
|
|
|
|
meta: { title: 'AuditFileLog', icon: 'Files' /*keepAlive: true*/ },
|
|
|
|
|
component: () => import('@/views/audit/fileList.vue'),
|
|
|
|
|
},
|
2024-09-13 16:34:15 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
export const lastRoutes = [
|
|
|
|
|
{ path: '/:catchAll(.*)', redirect: '/404', meta: { hide: true } },
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export const router = createRouter({
|
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
|
routes: constantRoutes,
|
|
|
|
|
})
|
|
|
|
|
|