Selaa lähdekoodia

feat: 修改管理员登陆提示错误信息.

zhangl 1 vuosi sitten
vanhempi
commit
9d00879285
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      backendApi/modules/v1/models/LoginForm.php

+ 2 - 2
backendApi/modules/v1/models/LoginForm.php

@@ -116,7 +116,7 @@ class LoginForm extends Model {
             }
             }
             if(!$this->_user['IS_ENABLE']){
             if(!$this->_user['IS_ENABLE']){
                 $this->_updateFailTimes($transaction,'账号已经被锁定,无法登录');
                 $this->_updateFailTimes($transaction,'账号已经被锁定,无法登录');
-                throw new Exception('账号已经被锁定,无法登录');
+                throw new Exception('用户名或者密码错误');
             }
             }
             if (!$this->_user->validatePassword($this->password)) {
             if (!$this->_user->validatePassword($this->password)) {
                 $this->_updateFailTimes($transaction,'用户名或者密码错误');
                 $this->_updateFailTimes($transaction,'用户名或者密码错误');
@@ -126,7 +126,7 @@ class LoginForm extends Model {
             $bindIp = trim($this->_user['BIND_IP']);
             $bindIp = trim($this->_user['BIND_IP']);
             if(!empty($bindIp) && !(new LoginIpChecker(Yii::$app->request->getUserIP(), $bindIp))->validate()){
             if(!empty($bindIp) && !(new LoginIpChecker(Yii::$app->request->getUserIP(), $bindIp))->validate()){
                 $this->_updateFailTimes($transaction,'登录IP与此账号绑定的IP不符');
                 $this->_updateFailTimes($transaction,'登录IP与此账号绑定的IP不符');
-                throw new Exception('登录IP与此账号绑定的IP不符'.$bindIp);
+                throw new Exception('用户名或者密码错误');
             }
             }
 
 
             //需要修改密码
             //需要修改密码