feat: 新增cookie值填写
This commit is contained in:
@ -89,9 +89,9 @@ export const useUserStore = defineStore('user', {
|
||||
}
|
||||
});
|
||||
|
||||
const pushAllowAccessRoutes = (pathNames: string[]) => {
|
||||
const pushAllowAccessRoutes = (includeRouteNames: string[]) => {
|
||||
const matchedRoute = appRoutes
|
||||
.filter((route: any) => pathNames.includes(route.name))
|
||||
.filter((route: any) => includeRouteNames.includes(route.name))
|
||||
.map((route: any) => route.name);
|
||||
this.allowAccessRoutes.push(...matchedRoute);
|
||||
};
|
||||
@ -99,10 +99,10 @@ export const useUserStore = defineStore('user', {
|
||||
menuList.forEach((item) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((child: any) => {
|
||||
pushAllowAccessRoutes(child.pathNames);
|
||||
pushAllowAccessRoutes(child.includeRouteNames);
|
||||
});
|
||||
} else {
|
||||
pushAllowAccessRoutes(item.pathNames);
|
||||
pushAllowAccessRoutes(item.includeRouteNames);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user