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