|
|
@@ -38,10 +38,11 @@ export const useAuthStore = defineStore({
|
|
|
const hasPermission = await usePermission();
|
|
|
const hideMenuNames = ["storeDecoration", "financialManagement", "licenseManagement", "dynamicManagement"];
|
|
|
|
|
|
- // 获取用户信息和 businessSection(经营板块)、mealsFlag(是否提供餐食)
|
|
|
+ // 获取用户信息和 businessSection(经营板块)、mealsFlag(是否提供餐食)、storeId
|
|
|
const userInfo = localGet("geeker-user")?.userInfo || {};
|
|
|
const businessSection = Number(userInfo.businessSection || localGet("businessSection") || 0);
|
|
|
const mealsFlag = Number(userInfo.mealsFlag || localGet("mealsFlag") || 0);
|
|
|
+ const storeId = userInfo.storeId ?? localGet("createdId");
|
|
|
|
|
|
// 递归处理菜单的显示/隐藏状态
|
|
|
const processMenus = (menuList: any[]) => {
|
|
|
@@ -101,6 +102,10 @@ export const useAuthStore = defineStore({
|
|
|
// 只有酒吧(businessSection=2) 和 KTV(businessSection=3) 显示其他资质证明
|
|
|
menu.meta.isHide = ![2, 3].includes(businessSection);
|
|
|
break;
|
|
|
+ case "子账号与角色管理":
|
|
|
+ // 有 storeId 时显示,无 storeId 时不显示
|
|
|
+ menu.meta.isHide = !storeId;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|