diff --git a/plugs/think-plugs-inspection/src/controller/api/Login.php b/plugs/think-plugs-inspection/src/controller/api/Login.php index b511833..4769028 100644 --- a/plugs/think-plugs-inspection/src/controller/api/Login.php +++ b/plugs/think-plugs-inspection/src/controller/api/Login.php @@ -52,6 +52,7 @@ class Login extends Controller if ($staff->password !== $password) { $this->error('密码错误'); } + $this->staff = $staff; $this->staff->save(['last_login_at' => date('Y-m-d H:i:s')]); $this->staff->tokens()->where('token', '<>', '')->delete(); $this->success('登录成功', [