前端代码第一次提交

This commit is contained in:
Lxq
2025-12-15 16:16:07 +08:00
parent 8aa2804b1c
commit 9c47f313b7
41 changed files with 7218 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'user',
component: () => import('../views/user/index.vue'),
},
{
path: '/role',
name: 'role',
component: () => import('../views/role/index.vue'),
},
{
path: '/department',
name: 'department',
component: () => import('../views/department/index.vue'),
},
{
path: '/position',
name: 'position',
component: () => import('../views/position/index.vue'),
},
{
path: '/manage-log',
name: 'manage-log',
component: () => import('../views/manage-log/index.vue'),
},
],
})
// 添加全局路由守卫
// router.beforeEach((to, from, next) => {
// const token = localStorage.getItem('token')
// if (to.path !== '/login' && !token) {
// next('/login')
// } else {
// next()
// }
// })
export default router