This commit is contained in:
Aiden 2024-10-18 10:21:53 +08:00
parent 90fecfc8c9
commit 68f9034042

View File

@ -29,6 +29,8 @@ export const hasPermission = (userPermission) => {
? userPermission ? userPermission
: [userPermission]; : [userPermission];
// 当前用户的权限列表 // 当前用户的权限列表
let permissionList = Local.get("ruleBtn") ? Local.get("ruleBtn") : []; let permissionList = uni.getStorageSync("ruleBtn")
? uni.getStorageSync("ruleBtn")
: [];
return userPermissionList.some((e) => permissionList.includes(e)); return userPermissionList.some((e) => permissionList.includes(e));
}; };