|
@@ -15,13 +15,16 @@ const router = createRouter({
|
|
...common,
|
|
...common,
|
|
{
|
|
{
|
|
path: '/',
|
|
path: '/',
|
|
|
|
+ redirect: '/homeIndex',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ path: '/homeIndex',
|
|
meta: { title: '基础研究动态管理平台', is_filter: true },
|
|
meta: { title: '基础研究动态管理平台', is_filter: true },
|
|
component: () => import('@common/src/components/studio-one-green/home.vue'),
|
|
component: () => import('@common/src/components/studio-one-green/home.vue'),
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: '/',
|
|
|
|
- name: 'index',
|
|
|
|
- meta: { title: '系统首页' },
|
|
|
|
|
|
+ path: '/homeIndex',
|
|
|
|
+ meta: { title: '基础研究动态管理平台', is_filter: true },
|
|
component: () => import('@/views/home/index.vue'),
|
|
component: () => import('@/views/home/index.vue'),
|
|
},
|
|
},
|
|
...admin,
|
|
...admin,
|
|
@@ -37,14 +40,40 @@ router.beforeEach((to, from, next) => {
|
|
if (token) {
|
|
if (token) {
|
|
// let user = jwt.decode(token);
|
|
// let user = jwt.decode(token);
|
|
const user = {
|
|
const user = {
|
|
- _id: '63b3ed3e404c08bbd8539965',
|
|
|
|
- account: 'admin',
|
|
|
|
- name: '管理员',
|
|
|
|
- role: ['63b641cf35df6c6862df5d39', '63b628199bb09c9905def4cc', '63b64b1f35df6c6862e11bf2', '63b62cac9bb09c9905e14857'],
|
|
|
|
- is_super: false,
|
|
|
|
- role_type: '1',
|
|
|
|
- iat: 1679041521,
|
|
|
|
- exp: 1679214321,
|
|
|
|
|
|
+ _id: '640a8f0d9dfe6bbfaba9880a',
|
|
|
|
+ nick_name: '个人账号',
|
|
|
|
+ unit: '63b511fa2f41cd4838e478bb',
|
|
|
|
+ role: ['63b64ac735df6c6862e0eba3', '63b64b6335df6c6862e13f14', '63b62d2a9bb09c9905e19063'],
|
|
|
|
+ role_type: '2',
|
|
|
|
+ email: 'guhongwei0324@163.com',
|
|
|
|
+ phone: '13174420325',
|
|
|
|
+ unit_address: '长春市朝阳区前进大街1244号',
|
|
|
|
+ exam_status: '1',
|
|
|
|
+ card: '220182199603257019',
|
|
|
|
+ basic_id: '640aa44061ebe6235411e9db',
|
|
|
|
+ entrances: {
|
|
|
|
+ web: {
|
|
|
|
+ is_use: false,
|
|
|
|
+ },
|
|
|
|
+ project: {
|
|
|
|
+ is_use: true,
|
|
|
|
+ url: 'http://jcdtgl.waityou24.cn/project',
|
|
|
|
+ },
|
|
|
|
+ admin: {
|
|
|
|
+ is_use: true,
|
|
|
|
+ url: 'http://jcdtgl.waityou24.cn/admin',
|
|
|
|
+ },
|
|
|
|
+ basic: {
|
|
|
|
+ is_use: true,
|
|
|
|
+ url: 'http://jcdtgl.waityou24.cn/basic',
|
|
|
|
+ },
|
|
|
|
+ studio: {
|
|
|
|
+ is_use: true,
|
|
|
|
+ url: 'http://jcdtgl.waityou24.cn/studio',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ iat: 1678686391,
|
|
|
|
+ exp: 1678859191,
|
|
};
|
|
};
|
|
store.commit('setUser', user, { root: true });
|
|
store.commit('setUser', user, { root: true });
|
|
next();
|
|
next();
|