mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 15:31:03 +00:00
修改权限分类
This commit is contained in:
parent
317d5715e4
commit
e7349e6a9e
@ -354,6 +354,12 @@ class SystemCrudServices extends BaseServices
|
||||
'add_time' => date('Y-m-d H:i:s')
|
||||
],
|
||||
];
|
||||
$routeService = app()->make(SystemRouteServices::class);
|
||||
foreach ($ruleData as $key => $item) {
|
||||
if ($routeService->count(['method' => $item['method'], 'path' => $item['path']])) {
|
||||
unset($ruleData[$key]);
|
||||
}
|
||||
}
|
||||
app()->make(SystemRouteServices::class)->saveAll($ruleData);
|
||||
//记录权限加入菜单表
|
||||
$menuData = [];
|
||||
|
||||
@ -204,7 +204,8 @@ class SystemRouteServices extends BaseServices
|
||||
$cateId = $commmonId;
|
||||
} else {
|
||||
if (!isset($item['option']['cate_name'])) {
|
||||
$cateId = $id;
|
||||
$rule = explode('/', $item['rule']);
|
||||
$cateId = $this->topCateId($app, $rule[0]);
|
||||
} else {
|
||||
$cateId = $this->topCateId($app, $item['option']['cate_name']);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user