diff --git a/application/admin/controller/Login.php b/application/admin/controller/Login.php index 976dcd8e1..7c956cef2 100644 --- a/application/admin/controller/Login.php +++ b/application/admin/controller/Login.php @@ -54,6 +54,11 @@ class Login extends BasicAdmin /** * 用户登录 * @return string + * @throws \think\Exception + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + * @throws \think\exception\PDOException */ public function index() { @@ -71,7 +76,7 @@ class Login extends BasicAdmin ($user['password'] !== md5($password)) && $this->error('登录密码与账号不匹配,请重新输入!'); empty($user['status']) && $this->error('账号已经被禁用,请联系管理!'); // 更新登录信息 - $data = ['login_at' => ['exp', 'now()'], 'login_num' => ['exp', 'login_num+1']]; + $data = ['login_at' => date('Y-m-d H:i:s'), 'login_num' => $user['login_num'] + 1]; Db::name('SystemUser')->where('id', $user['id'])->update($data); session('user', $user); !empty($user['authorize']) && NodeService::applyAuthNode();