王旭
2022-10-12 410facfa35a29a14f2dc5a5d74629a8291148aff
src/router/index.js
@@ -1,6 +1,6 @@
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'; //综合展示
@@ -36,7 +36,7 @@
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);
@@ -50,7 +50,7 @@
    path: '/',
    name: 'Home',
    component: Home,
    redirect: "/Synthesis",
    redirect: '/Synthesis',
    children: [
      {
        path: '/Synthesis',
@@ -328,6 +328,16 @@
          requireAuth: true, // 标识该路由是否需要登录
        },
      },
      {
        path: '/resourceManage',
        component: resourceManage,
        name: 'resourceManage',
        meta: {
          title: '资源管理',
          requireAuth: true, // 标识该路由是否需要登录
        },
      },
    ],
  },
];
@@ -345,7 +355,7 @@
      next();
    } else {
      next({
        path: "/login",
        path: '/login',
      });
    }
  } else {