mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
修改获取权限
This commit is contained in:
parent
d3f6a8e75b
commit
7c96f0fa21
@ -274,9 +274,8 @@ class SystemMenus extends AuthController
|
||||
*/
|
||||
public function ruleList()
|
||||
{
|
||||
$ruleList = app()->make(SystemRouteCateServices::class)->selectList(['app_name' => 'adminapi'], 'id,name', 0, 0, 'id asc,sort desc', ['children']);
|
||||
//获取所有的路由
|
||||
// $ruleList = app()->make(SystemRouteServices::class)->selectList(['app_name' => 'adminapi'], 'name,path,method,type,id')->toArray();
|
||||
$ruleList = app()->make(SystemRouteCateServices::class)->selectList(['app_name' => 'adminapi'], 'id,name', 0, 0, 'id asc,sort desc', ['children'])->toArray();
|
||||
$menuApiList = $this->services->getColumn(['auth_type' => 2, 'is_del' => 0], "concat(`api_url`,'_',lower(`methods`)) as rule");
|
||||
if ($menuApiList) $menuApiList = array_column($menuApiList, 'rule');
|
||||
$list = [];
|
||||
|
||||
@ -39,6 +39,6 @@ class SystemRouteCate extends BaseModel
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(SystemRoute::class, 'cate_id', 'id')->field(['id', 'cate_id', 'name', 'name as real_name', 'path', 'method'])->order('add_time desc');
|
||||
return $this->hasMany(SystemRoute::class, 'cate_id', 'id')->field(['id', 'type', 'cate_id', 'name', 'name as real_name', 'path', 'method'])->order('add_time desc');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user