新增权限功能
This commit is contained in:
@@ -31,7 +31,7 @@ class AuthService
|
||||
|
||||
return match ($loginType) {
|
||||
'feishu' => $logic->feishuLogin($data),
|
||||
'qrcode' => $logic->qrCodeLogin($data),
|
||||
// 'qrcode' => $logic->qrCodeLogin($data),
|
||||
default => $logic->uPwdLogin($data),
|
||||
};
|
||||
}
|
||||
@@ -86,4 +86,13 @@ class AuthService
|
||||
{
|
||||
(new AuthLogic())->blockToken($token, $systemCode);
|
||||
}
|
||||
|
||||
|
||||
// public function perms()
|
||||
// {
|
||||
// $permService = new PermService();
|
||||
// $menuTree = $permService->getMenuTree($uid);
|
||||
// $permissionCodes = $permService->getPermissionCodes($uid);
|
||||
// return (new PermService())->getMenuTree($this->userId)
|
||||
// }
|
||||
}
|
||||
@@ -30,13 +30,10 @@ class PermService
|
||||
if ($cached !== null) {
|
||||
return $cached;
|
||||
}
|
||||
|
||||
// 调用 Logic 层获取资源
|
||||
$resources = $this->logic->getUserResources($userId);
|
||||
|
||||
// 缓存结果
|
||||
Cache::set($cacheKey, $resources, 3600);
|
||||
|
||||
return $resources;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user