user表role改为role_id;后台管理用户增删改查封装成component
This commit is contained in:
@@ -199,9 +199,9 @@ const router = createRouter({
|
||||
router.beforeEach((to, from, next) => {
|
||||
document.title = `${to.meta.title} | ${settings.siteTitle}`;
|
||||
const username = localStorage.getItem('ms_username');
|
||||
const role = localStorage.getItem('ms_role_id');
|
||||
const roleId = localStorage.getItem('ms_role_id');
|
||||
const permiss = usePermissStore();
|
||||
const currentUserPermiss = permiss[role as string];
|
||||
const currentUserPermiss = permiss[roleId as string];
|
||||
// console.log("currentUserPermiss", currentUserPermiss)
|
||||
if (!username && to.path !== '/login') {
|
||||
next({
|
||||
|
Reference in New Issue
Block a user