修复:权限编辑时,节点菜单或首页展示模块未勾选时为空的判断
This commit is contained in:
parent
d3ebf7e4a4
commit
da1694839a
@ -40,6 +40,12 @@ class Role extends BaseController
|
||||
if (request()->isAjax()) {
|
||||
$ruleData = isset($param['rule']) ? $param['rule'] : 0;
|
||||
$layoutData = isset($param['layout']) ? $param['layout'] : 0;
|
||||
if($ruleData==0){
|
||||
return to_assign(1, '权限节点至少选择一个');
|
||||
}
|
||||
if($layoutData==0){
|
||||
return to_assign(1, '首页展示模块至少选择一个');
|
||||
}
|
||||
$param['rules'] = implode(',', $ruleData);
|
||||
$param['layouts'] = implode(',', $layoutData);
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user