From 3ccaa15c604d9266de940ed412be91f1fcf02cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 7 Jan 2019 09:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Index.php | 5 +++++ application/index/view/index/welcome.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index ee314e80..108d3c7d 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -61,6 +61,11 @@ class Index extends Base ->field('title,thinks,danwei') ->find(); + // 查询用户登录次数 + $admin = new \app\admin\model\Admin; + $userid = session('userid'); + $list['denglucishu'] = $admin->where('id',$userid)->value('denglucishu'); + // 获取版本号 $list->version = config('app.chengji.version'); diff --git a/application/index/view/index/welcome.html b/application/index/view/index/welcome.html index 0dd2ddae..f397cd78 100644 --- a/application/index/view/index/welcome.html +++ b/application/index/view/index/welcome.html @@ -24,7 +24,7 @@

欢迎使用{$list.title} v{$list.version}!

-

登录次数:18

+

登录次数:{$list.denglucishu}

上次登录IP:222.35.131.79.1 上次登录时间:2014-6-14 11:19:55