diff --git a/README.md b/README.md index bc1bca9f..8624db94 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,13 @@ ## 演示地址 http://xiaoshongshu.cn 帐号 test1 密码 123456 +里面隐藏了两个很实用的功能,如果想了解隐藏功能,请下载。 ## 更新内容 前端使用X-admin(感谢singliang大神建议) 后端更新最新TP框架。 优化后端代码 -升级提示 +## 升级提示 修改了很多数据表和权限,建议重新建表 diff --git a/application/chengji/controller/Index.php b/application/chengji/controller/Index.php index 3f32eb73..912b516a 100644 --- a/application/chengji/controller/Index.php +++ b/application/chengji/controller/Index.php @@ -258,7 +258,7 @@ class Index extends Base 'ksSubject'=>function($query){ $query->field('kaoshiid,subjectid') ->with(['subjectName'=>function($q){ - $q->field('id,jiancheng,lieming'); + $q->field('id,title,lieming'); }] ); } diff --git a/application/chengji/view/index/index.html b/application/chengji/view/index/index.html index 701ca040..915dc97a 100644 --- a/application/chengji/view/index/index.html +++ b/application/chengji/view/index/index.html @@ -96,7 +96,7 @@ xk = eval(decodeURIComponent(xk)); for(x in xk) { - options.cols[0].push({field: xk[x].subject_name.lieming, title: xk[x].subject_name.jiancheng ,sort: true}); + options.cols[0].push({field: xk[x].subject_name.lieming, title: xk[x].subject_name.title , minWidth:100,sort: true}); } options.cols[0].push({field: 'avg', title: '平均分', minWidth:100,sort: true}); options.cols[0].push({field: 'sum', title: '总分', minWidth:100,sort: true}); diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 507bed16..84c0c3f2 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -74,22 +74,34 @@ class Index extends Base ->field('webtitle,thinks,danwei') ->find(); - // // 查询用户登录次数 - // $admin = new \app\admin\model\Admin; - // $userid = session('userid'); + // 查询用户登录次数 $list['username'] = session('username'); - // $list['denglu'] = $admin->where('id',$userid) - // ->field('denglucishu,lastip,lasttime') - // ->find(); - // $list['yuyan'] = request()->langset(); $list['server'] = request()->server(); - // $list['env'] = request()->env(); - - - // 获取版本号 $list->version = config('app.chengji.version'); + // 考试数 + $con = new \app\kaoshi\model\Kaoshi; + $list['kaoshi'] = $con->count(); + // 教师数 + $con = new \app\renshi\model\Teacher; + $list['teacher'] = $con->count(); + // 学生数 + $con = new \app\renshi\model\Student; + $list['student'] = $con->count(); + // 管理员数 + $con = new \app\admin\model\Admin; + $list['admin'] = $con->count(); + // 荣誉数 + $con = new \app\rongyu\model\JsRongyuInfo; + $list['rongyu'] = $con->count(); + // 课题数 + $con = new \app\keti\model\KetiInfo; + $list['keti'] = $con->count(); + + + + // 模版赋值 $this->assign('list',$list); diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html index 4d5112df..04b43b45 100644 --- a/application/index/view/index/index.html +++ b/application/index/view/index/index.html @@ -44,7 +44,7 @@ {$list.username}
- 66
+ {$list.kaoshi}- 12
+ {$list.teacher}- 99
+ {$list.student}- 67
+ {$list.admin}- 67
+ {$list.rongyu}- 6766
+ {$list.keti}