优化欢迎页
This commit is contained in:
1 parent
6fa31ab3eb
commit
4407474d2b
2 files changed
+24
-3
No files matched your search
@@ -94,18 +94,39 @@ class Index extends Base
|
||||
//实例化数据模型
|
||||
$sysbasemod = new sysbasemod();
|
||||
|
||||
// 查询最新记录
|
||||
// 查询系统设置
|
||||
$list = $sysbasemod
|
||||
->order(['id'=>'desc'])
|
||||
->field('webtitle,thinks,danwei')
|
||||
->find();
|
||||
|
||||
// 查询用户登录次数
|
||||
// 查询用户登信息
|
||||
$list['username'] = session('username');
|
||||
// 查询用户组
|
||||
$admin = new \app\admin\model\Admin;
|
||||
$admininfo = $admin->where('username',$list['username'])
|
||||
->field('id')
|
||||
->with([
|
||||
'glGroup'=>function($query){
|
||||
$query->where('status',1)->field('title,rules,miaoshu');
|
||||
}
|
||||
])
|
||||
->find();
|
||||
$list['group'] = '';
|
||||
foreach ($admininfo->gl_group as $key => $value) {
|
||||
if($key==0)
|
||||
{
|
||||
$list['group'] = $value->title;
|
||||
}else{
|
||||
$list['group'] = $list['group'].'、'.$value->title;
|
||||
}
|
||||
}
|
||||
|
||||
$list['server'] = request()->server();
|
||||
// 获取版本号
|
||||
$list->version = config('app.chengji.version');
|
||||
|
||||
|
||||
// 考试数
|
||||
$con = new \app\kaoshi\model\Kaoshi;
|
||||
$list['kaoshi'] = $con->count();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<blockquote class="layui-elem-quote">欢迎管理员:
|
||||
<blockquote class="layui-elem-quote">欢迎{$list.group}:
|
||||
<span class="x-red">{$list['username']}</span>!当前时间:{php} echo date('Y-m-d h:m:s'){/php}
|
||||
</blockquote>
|
||||
<fieldset class="layui-elem-field">
|
||||
|
||||
Reference in new issue
Block a user