Bladeren bron

提示语改中文

lizhen_gitee 4 weken geleden
bovenliggende
commit
d070851129

+ 1 - 1
application/admin/controller/Index.php

@@ -103,7 +103,7 @@ class Index extends Backend
                 $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]);
             } else {
                 $msg = $this->auth->getError();
-                $msg = $msg ? $msg : __('Username or password is incorrect');
+                $msg = $msg ? $msg : __('用户名或密码错误');
                 $this->error($msg, $url, ['token' => $this->request->token()]);
             }
         }

+ 2 - 2
application/admin/library/Auth.php

@@ -40,7 +40,7 @@ class Auth extends \fast\Auth
     {
         $admin = Admin::get(['username' => $username]);
         if (!$admin) {
-            $this->setError('Username is incorrect');
+            $this->setError('用户名不正确');
             return false;
         }
         if ($admin['status'] == 'hidden') {
@@ -54,7 +54,7 @@ class Auth extends \fast\Auth
         if ($admin->password != $this->getEncryptPassword($password, $admin->salt)) {
             $admin->loginfailure++;
             $admin->save();
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
         $admin->loginfailure = 0;

+ 3 - 3
application/common/library/Auth.php

@@ -214,7 +214,7 @@ class Auth
         $field = Validate::is($account, 'email') ? 'email' : (Validate::regex($account, '/^1\d{10}$/') ? 'mobile' : 'username');
         $user = User::get([$field => $account]);
         if (!$user) {
-            $this->setError('Account is incorrect');
+            $this->setError('账户不正确');
             return false;
         }
 
@@ -223,7 +223,7 @@ class Auth
             return false;
         }
         if ($user->password != $this->getEncryptPassword($password, $user->salt)) {
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
 
@@ -283,7 +283,7 @@ class Auth
             }
             return true;
         } else {
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
     }

+ 3 - 3
application/common/library/Authcompany.php

@@ -142,7 +142,7 @@ class Authcompany extends \fast\Authpc
         $field = 'username';
         $user = User::get([$field => $account]);
         if (!$user) {
-            $this->setError('Account is incorrect');
+            $this->setError('账户不正确');
             return false;
         }
 
@@ -158,7 +158,7 @@ class Authcompany extends \fast\Authpc
 
         if ($user->password != $this->getEncryptPassword($password, $user->salt)) {
             $user->loginfailure++;
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
 
@@ -218,7 +218,7 @@ class Authcompany extends \fast\Authpc
             }
             return true;
         } else {
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
     }

+ 3 - 3
application/common/library/Authworker.php

@@ -260,7 +260,7 @@ class Authworker
         $field = 'mobile';
         $user = Worker::get([$field => $account]);
         if (!$user) {
-            $this->setError('Account is incorrect');
+            $this->setError('账户不正确');
             return false;
         }
 
@@ -273,7 +273,7 @@ class Authworker
             return false;
         }
         if ($user->password != $this->getEncryptPassword($password)) {
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
 
@@ -333,7 +333,7 @@ class Authworker
             }
             return true;
         } else {
-            $this->setError('Password is incorrect');
+            $this->setError('密码不正确');
             return false;
         }
     }

+ 1 - 1
application/company/controller/Index.php

@@ -60,7 +60,7 @@ class Index extends Apic
             $this->success('登录成功', $data);
         } else {
             $msg = $this->auth->getError();
-            $msg = $msg ? $msg : __('Username or password is incorrect');
+            $msg = $msg ? $msg : __('用户名或密码不正确');
             $this->error($msg);
         }
     }