From 30835518bebaddff9e132cbd347c67bc95b97ce5 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Thu, 6 Jun 2019 20:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=AC=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E9=97=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/login/controller/Index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/login/controller/Index.php b/application/login/controller/Index.php index 1a5c3a0f..0345a1be 100644 --- a/application/login/controller/Index.php +++ b/application/login/controller/Index.php @@ -68,11 +68,13 @@ class Index extends Controller } // 将本次信息上传到服务器上 - $userinfo = AD::getByUsername($data['username']); + $userinfo = AD::where('username',$data['username']) + ->field('lastip,username,ip,denglucishu,lasttime,thistime') + ->find(); $userinfo->lastip = $userinfo->ip; $userinfo->ip = request()->ip(); $userinfo->denglucishu = ['inc', 1]; - $userinfo->lasttime = $userinfo->thistime; + $userinfo->lasttime = $userinfo->getData('thistime'); $userinfo->thistime = time(); $userinfo->save();