From f124559b12ae65ab58809aa6c9ab1a425ca3d776 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Fri, 7 Dec 2018 22:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=A7=91=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E7=AE=A1=E7=90=86=E5=91=98=E4=BF=A1=E6=81=AF=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Index.php | 13 ++++++----- .../admin/view/index/edit_password.html | 6 ++--- application/index/controller/Index.php | 2 +- application/index/view/index/welcome.html | 2 +- application/login/view/index/index.html | 4 +++- application/system/controller/SystemBase.php | 6 ++--- application/system/validate/SystemBase.php | 1 - application/system/view/system_base/edit.html | 10 --------- .../system/view/system_base/index.html | 2 -- application/teach/controller/Subject.php | 18 ++++++++------- application/teach/model/Subject.php | 22 +++++++++++++------ application/teach/view/subject/create.html | 16 ++++++++++++++ application/teach/view/subject/edit.html | 15 ++++++++++++- application/teach/view/subject/index.html | 8 ++++--- config/app.php | 2 +- .../migrations/20181010035225_system_base.php | 1 - .../migrations/20181030024954_subject.php | 1 + database/seeds/Admin.php | 21 +++++++++++++----- database/seeds/School.php | 6 ++--- database/seeds/Subject.php | 14 ++++++------ database/seeds/SystemBase.php | 1 - 21 files changed, 105 insertions(+), 66 deletions(-) diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 2c02844b..44561f15 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -15,7 +15,7 @@ class Index extends Base public function index() { - $count = AD::where('id','>',1)->count(); + $count = AD::where('id','>',2)->count(); // 设置要给模板赋值的信息 $list['title'] = '管理员列表'; @@ -50,14 +50,15 @@ class Index extends Base $search = $getdt['search']['value']; - // 获取记录集总数 - $cnt = AD::where('id','>',1)->count(); + //查询数据 $data = AD::field('id,xingming,sex,username,phone,shengri,denglucishu,status,create_time') - ->where('id','>','1') + ->where('id','>','2') ->order([$order_field=>$order]) ->limit($limit_start,$limit_length) - ->all(); + ->select(); + // 获取记录集总数 + $cnt = $data->count(); // 如果需要查询 @@ -67,7 +68,7 @@ class Index extends Base ->order([$order_field=>$order]) ->limit($limit_start,$limit_length) ->where('username|xingming','like','%'.$search.'%') - ->all(); + ->select(); } $datacnt = $data->count(); diff --git a/application/admin/view/index/edit_password.html b/application/admin/view/index/edit_password.html index e06c88c4..982aa222 100644 --- a/application/admin/view/index/edit_password.html +++ b/application/admin/view/index/edit_password.html @@ -36,8 +36,8 @@ {block name="yanzheng"}