注释验证码

This commit is contained in:
liu 2024-06-29 14:45:39 +08:00
parent 70920df001
commit f7f60c47d9

View File

@ -40,16 +40,16 @@ class UserController extends BaseAdminController
{
$params = (new UserValidate())->post()->goCheck('storeAdd');
$code = $params['code'];
if($code && $params['mobile']){
$remark = $params['mobile'].'_userArchives';
$codeCache = Cache::get($remark);
if(empty($codeCache)){
return $this->fail('验证码不存在');
}
if ($codeCache != $code) {
return $this->fail('验证码错误');
}
}
// if($code && $params['mobile']){
// $remark = $params['mobile'].'_userArchives';
// $codeCache = Cache::get($remark);
// if(empty($codeCache)){
// return $this->fail('验证码不存在');
// }
// if ($codeCache != $code) {
// return $this->fail('验证码错误');
// }
// }
UserLogic::StoreAdd($params);
if (UserLogic::hasError() ) {
return $this->fail(UserLogic::getError());