文件管理,接入验证码

This commit is contained in:
augushong
2019-08-24 13:42:57 +08:00
parent 3968213bb4
commit b9f4379bc4
15 changed files with 387 additions and 26 deletions

View File

@@ -28,7 +28,10 @@ class Login extends Common
$post_data = $this->request->post();
$validate = Validate::rule('account',Rule::isRequire())
->rule('password',Rule::isRequire());
->rule('password',Rule::isRequire())
->rule('captcha',function($value){
return \captcha_check($value)?true:'验证码错误';
});
if(!$validate->check($post_data)){
return json_message($validate->getError());