From da1694839adacc3fe82cb473d610625d2b10ca20 Mon Sep 17 00:00:00 2001 From: hdm Date: Sat, 3 Jun 2023 09:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=EF=BC=8C=E8=8A=82=E7=82=B9=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=88=96=E9=A6=96=E9=A1=B5=E5=B1=95=E7=A4=BA=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=9C=AA=E5=8B=BE=E9=80=89=E6=97=B6=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/controller/Role.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/home/controller/Role.php b/app/home/controller/Role.php index 75e188f..71d883f 100644 --- a/app/home/controller/Role.php +++ b/app/home/controller/Role.php @@ -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) {