add: 增加超级会员页面,修复未绑定美团的检查登录报错而未成功跳转首页问题

This commit is contained in:
2025-09-12 13:23:27 +08:00
parent ea4230a9e8
commit d950aef4e5
11 changed files with 1065 additions and 26 deletions

View File

@@ -33,6 +33,23 @@ export const usePermissionStore = defineStore("permission", () => {
.then((data) => {
if (!isTest) {
const dynamicRoutes = parseDynamicRoutes(data.filter(v => v.type == 0));
console.log('dynamicRoutes')
console.log(dynamicRoutes)
dynamicRoutes.forEach((route) => {
//过滤出可见子节点
let onlyOneChild = null
const showingChildren = route.children.filter((route) => {
if (!route.meta?.hidden) {
onlyOneChild = route;
return true;
}
return false;
});
// 仅有一个节点
if (showingChildren.length === 1 && onlyOneChild) {
route.redirect = onlyOneChild.path;
}
})
routes.value = [...constantRoutes, ...dynamicRoutes];
isRoutesLoaded.value = true;
resolve(dynamicRoutes);