From 5255231a12b0846ba4a3d9baf1cd97da77c6a33b Mon Sep 17 00:00:00 2001
From: cxdbz
Date: Sun, 26 May 2019 17:39:46 +0800
Subject: [PATCH] 0
---
README.md | 3 +-
application/chengji/controller/Index.php | 2 +-
application/chengji/view/index/index.html | 2 +-
application/index/controller/Index.php | 34 +++++++++++++------
application/index/view/index/index.html | 2 +-
application/index/view/index/welcome.html | 26 +++++++-------
.../kaoshi/view/index/more_action.html | 26 +++++++-------
7 files changed, 54 insertions(+), 41 deletions(-)
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}
- 个人信息
- - 个人信息
+ - 修改密码
- 切换帐号
diff --git a/application/index/view/index/welcome.html b/application/index/view/index/welcome.html
index c844836c..3b2f6d51 100644
--- a/application/index/view/index/welcome.html
+++ b/application/index/view/index/welcome.html
@@ -26,44 +26,44 @@
- 会员数
+ 教师数
- 12
+ {$list.teacher}
- 回复数
+ 学生数
- 99
+ {$list.student}
- 商品数
+ 管理员数
- 67
+ {$list.admin}
- 文章数
+ 荣誉数
- 67
+ {$list.rongyu}
- 文章数
+ 课题数
- 6766
+ {$list.keti}
@@ -81,7 +81,7 @@
|
- 新版正式上线了!前端改成X-admin,看着更舒服使用更顺手。
+ 新版正式上线了!前端改成X-admin,后端代码重构,看着更舒服使用更顺手。
|
diff --git a/application/kaoshi/view/index/more_action.html b/application/kaoshi/view/index/more_action.html
index b6bd6c90..3ee440d0 100644
--- a/application/kaoshi/view/index/more_action.html
+++ b/application/kaoshi/view/index/more_action.html
@@ -40,24 +40,24 @@