cqp 3 ヶ月 前
コミット
139be023ea
1 ファイル変更1 行追加0 行削除
  1. 1 0
      app/Service/EmployeeService.php

+ 1 - 0
app/Service/EmployeeService.php

@@ -315,6 +315,7 @@ class EmployeeService extends Service
         if(! empty($data['is_admin'])){
             if(empty($data['password'])) return [false, '密码不能为空'];
             if(mb_strlen($data['password']) < 6) return [false, '密码长度不得小于6位长度'];
+            if(! empty($data['role'])) return [false, '角色不能为空'];
         }
         $data['top_depart_id'] = $user['top_depart_id'];