新增消息列表
This commit is contained in:
@@ -5,6 +5,7 @@ import _hook from "@/hooks/index.js";
|
||||
import { useRoutes } from "@/store/routes.js";
|
||||
import NProgress from "nprogress";
|
||||
import "nprogress/nprogress.css";
|
||||
import { useUser } from "@/store/user.js";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
@@ -15,6 +16,7 @@ NProgress.configure({ showSpinner: false });
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
const token = _hook.useLocalStorage.get("token");
|
||||
const storeUser = useUser();
|
||||
if (to.path === "/login" && !token) {
|
||||
next();
|
||||
NProgress.done();
|
||||
@@ -36,6 +38,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
storeRoutes.setNavbar(to.path);
|
||||
next();
|
||||
NProgress.done();
|
||||
storeUser.getNotices()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +292,16 @@ export const asyncRoutes = [
|
||||
title: '大机构',
|
||||
icon: 'Tickets'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/organization/big_organization/agent_detail',
|
||||
name: 'agent_detail',
|
||||
component: () => import('@/views/organization/agent_detail.vue'),
|
||||
meta: {
|
||||
title: '机构详情',
|
||||
isHide: true,
|
||||
activeMenu: '/organization/big_organization'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -520,5 +530,27 @@ export const asyncRoutes = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/notice',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '消息管理',
|
||||
isHide: true,
|
||||
roles: ['MG']
|
||||
},
|
||||
redirect: '/notice/index',
|
||||
children: [
|
||||
{
|
||||
isHide: true,
|
||||
path: '/notice/index',
|
||||
name: 'noticeIndex',
|
||||
component: () => import('@/views/notice/index.vue'),
|
||||
meta: {
|
||||
title: '消息列表',
|
||||
isHide: true,
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user