From acf039cb781c07b524c7d4c9f6b19f2035beb8fa Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Mon, 28 Jan 2019 17:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/project/controller/Login.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/project/controller/Login.php b/application/project/controller/Login.php index 9b59ca1..f52d8e8 100644 --- a/application/project/controller/Login.php +++ b/application/project/controller/Login.php @@ -60,9 +60,6 @@ class Login extends BasicApi // 'password.require' => '登录密码不能为空!', // 'password.min' => '登录密码长度不能少于4位有效字符!', // ]); - if (session('captcha') != Request::param('captcha')) { - $this->error('验证码错误', 203); - } $data = [ 'account' => $this->request->post('account', ''), 'password' => $this->request->post('password', ''), @@ -71,6 +68,9 @@ class Login extends BasicApi // 用户信息验证 $mobile = $this->request->post('mobile', ''); if ($mobile) { + if (session('captcha') != Request::param('captcha')) { + $this->error('验证码错误', 203); + } $member = \app\common\Model\Member::where(['mobile' => $mobile])->order('id asc')->find(); } else { $member = \app\common\Model\Member::where(['account' => $data['account']])->whereOr(['email' => $data['account']])->order('id asc')->find();