登录逻辑,为了测试暂时关闭验证码

This commit is contained in:
2025-01-10 13:37:41 +08:00
parent 4e3983ea16
commit 0ad3b20a4e

View File

@@ -54,10 +54,12 @@ class LoginController extends BaseAdminController
try {
if (Yii::$app->request->isPost) {
if (!$redis->exists($codeKey)) {
throw new Exception('验证码已过期');
} elseif ($code != $redis->get($codeKey) && $code != '999999') {
throw new Exception('验证码错误');
if ($code != '999999') {
if (!$redis->exists($codeKey)) {
throw new Exception('验证码已过期');
} elseif ($code != $redis->get($codeKey)) {
throw new Exception('验证码错误');
}
}
/** @var $adminAccessToken AdminAccessToken */
if ($model->load($post, '') && $adminAccessToken = $model->login()) {