|
@@ -40,4 +40,12 @@ class Base extends BaseController
|
|
|
if($this->roleid==='') throw new \Exception( '没有该公司的角色或角色已禁用',10000);
|
|
|
}
|
|
|
}
|
|
|
+ public function validate($data,$rule,$message=[],$field=[]){
|
|
|
+ try {
|
|
|
+ parent::validate($data,$rule);
|
|
|
+ }catch (\Exception $e){
|
|
|
+ return $e->getMessage();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|