feat: 新增cookie值填写

This commit is contained in:
rd
2025-07-10 10:04:21 +08:00
parent 003b5d82b0
commit 1eea2312f3
6 changed files with 105 additions and 56 deletions

View File

@ -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);
}
});