修改报错返回格式

This commit is contained in:
liu 2024-06-26 18:27:36 +08:00
parent 302499033c
commit eb0aa5b6fc

View File

@ -187,7 +187,7 @@ class UserController extends BaseApiController
$remark = $this->userId.'_payPassword';
$code = Cache::get($remark);
if ($code && isset($params['code']) && $code !== $params['code']) {
throw new Exception('验证码错误');
return $this->fail('验证码错误');
}
if ($params['rePassword'] !== $params['password'])
return $this->fail('两次密码不一致');