wuggemail@foxmail.com 3 ヶ月 前
コミット
6fdc31de01
1 ファイル変更8 行追加0 行削除
  1. 8 0
      app/cxinv/controller/Base.php

+ 8 - 0
app/cxinv/controller/Base.php

@@ -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;
+    }
 }