| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- import { createRouter, createWebHashHistory } from 'vue-router'
- const constantRoutes = [
- {
- path: '/login',
- name: 'Login',
- meta: { title: 'Login' },
- component: () => import('@/views/login/login.vue'),
- },
- {
- path: '/404',
- component: () => import('@/views/error-page/404.vue'),
- hidden: true,
- },
- {
- path: '/oauth/:code',
- component: () => import('@/views/oauth/login.vue'),
- hidden: true,
- },
- {
- path: '/oauth/bind/:code',
- component: () => import('@/views/oauth/bind.vue'),
- hidden: true,
- },
- ]
- 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',
- redirect: '/my/info',
- meta: { title: 'My', icon: 'UserFilled' },
- component: () => import('@/layout/index.vue'),
- children: [
- {
- path: '/',
- name: 'MyInfo',
- meta: { title: 'Info', icon: 'User' /*keepAlive: true*/ },
- component: () => import('@/views/my/info.vue'),
- },
- {
- path: 'address_book',
- name: 'MyAddressBookList',
- meta: { title: 'AddressBooks', icon: 'Notebook' /*keepAlive: true*/ },
- component: () => import('@/views/my/address_book/index.vue'),
- },
- {
- path: 'tag',
- name: 'MyTagList',
- meta: { title: 'Tags', icon: 'CollectionTag' /*keepAlive: true*/ },
- component: () => import('@/views/my/tag/index.vue'),
- },
- ],
- },
- {
- path: '/user',
- name: 'User',
- redirect: '/user/index',
- meta: { title: 'System', icon: 'Setting' },
- component: () => import('@/layout/index.vue'),
- children: [
- {
- path: 'peer',
- name: 'Peer',
- meta: { title: 'PeerManage', icon: 'Monitor' /*keepAlive: true*/ },
- component: () => import('@/views/peer/index.vue'),
- },
- {
- path: 'group',
- name: 'UserGroup',
- meta: { title: 'GroupManage', icon: 'ChatRound' /*keepAlive: true*/ },
- component: () => import('@/views/group/index.vue'),
- },
- {
- path: 'index',
- name: 'UserList',
- meta: { title: 'UserManage', icon: 'User' /*keepAlive: true*/ },
- component: () => import('@/views/user/index.vue'),
- },
- {
- path: 'add',
- name: 'UserAdd',
- meta: { title: 'UserAdd', hide: true },
- component: () => import('@/views/user/edit.vue'),
- },
- {
- path: 'edit/:id',
- name: 'UserEdit',
- meta: { title: 'UserEdit', hide: true },
- component: () => import('@/views/user/edit.vue'),
- },
- {
- path: 'addressBook',
- name: 'UserAddressBook',
- meta: { title: 'AddressBookManage', icon: 'Notebook' /*keepAlive: true*/ },
- component: () => import('@/views/address_book/index.vue'),
- },
- {
- path: 'tag',
- name: 'UserTag',
- meta: { title: 'TagsManage', icon: 'CollectionTag' /*keepAlive: true*/ },
- component: () => import('@/views/tag/index.vue'),
- },
- {
- path: '/oauth',
- name: 'Oauth',
- meta: { title: 'OauthManage', icon: 'Link' /*keepAlive: true*/ },
- component: () => import('@/views/oauth/index.vue'),
- },
- {
- path: '/loginLog',
- name: 'LoginLog',
- meta: { title: 'LoginLog', icon: 'List' /*keepAlive: true*/ },
- component: () => import('@/views/login/log.vue'),
- },
- {
- path: '/auditConn',
- name: 'AuditConn',
- meta: { title: 'AuditConnLog', icon: 'Tickets' /*keepAlive: true*/ },
- component: () => import('@/views/audit/connList.vue'),
- },
- {
- path: '/auditFile',
- name: 'AuditFile',
- meta: { title: 'AuditFileLog', icon: 'Files' /*keepAlive: true*/ },
- component: () => import('@/views/audit/fileList.vue'),
- },
- ],
- },
- ]
- export const lastRoutes = [
- { path: '/:catchAll(.*)', redirect: '/404', meta: { hide: true } },
- ]
- export const router = createRouter({
- history: createWebHashHistory(),
- routes: constantRoutes,
- })
|