| | |
| | | import Vue from 'vue'; |
| | | import VueRouter from 'vue-router'; |
| | | import { getToken } from "@/utils/auth"; // get token from cookie |
| | | import { getToken } from '@/utils/auth'; // get token from cookie |
| | | import Home from '../views/Home.vue'; |
| | | import login from '../components/login'; |
| | | import Synthesis from '../views/Synthesis/index.vue'; //综合展示 |
| | |
| | | import roleManage from '../views/userManage/roleManage.vue'; // 用户管理模块 |
| | | import groupManage from '../views/userManage/groupManage.vue'; // 用户管理模块 |
| | | import authorityManage from '@/views/userManage/authorityManage.vue'; //用户管理-权限管理 |
| | | |
| | | import resourceManage from '@/views/userManage/resourceManage.vue'; //用户管理-资源管理 |
| | | // 群组管理 |
| | | Vue.use(VueRouter); |
| | | |
| | |
| | | path: '/', |
| | | name: 'Home', |
| | | component: Home, |
| | | redirect: "/Synthesis", |
| | | redirect: '/Synthesis', |
| | | children: [ |
| | | { |
| | | path: '/Synthesis', |
| | |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | { |
| | | path: '/resourceManage', |
| | | component: resourceManage, |
| | | name: 'resourceManage', |
| | | meta: { |
| | | title: '资源管理', |
| | | requireAuth: true, // 标识该路由是否需要登录 |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | |
| | | next(); |
| | | } else { |
| | | next({ |
| | | path: "/login", |
| | | path: '/login', |
| | | }); |
| | | } |
| | | } else { |