diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index 6e1251932..759b658f0 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -86,10 +86,10 @@ class Login extends Controller } $this->app->session->set('user', $user->toArray()); $this->app->session->delete("LoginInputSessionError"); - $user->inc('login_num')->save([ - 'login_at' => date('Y-m-d H:i:s'), - 'login_ip' => $this->app->request->ip(), - ]); + $user->inc('login_num'); + $user['login_at'] = date('Y-m-d H:i:s'); + $user['login_ip'] = $this->app->request->ip(); + $user->save(); sysoplog('系统用户登录', '登录系统后台成功'); $this->success('登录成功', sysuri('admin/index/index')); }