From 663cafe365a538c8a67b065943643496a52dd543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Wed, 10 Oct 2018 10:56:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BAstudent=E5=92=8Csystem?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BF=AE=E6=94=B9=E4=B8=BB=E9=A1=B5=E4=B8=8E?= =?UTF-8?q?=E6=AC=A2=E8=BF=8E=E9=A1=B5=E5=86=85=E5=AE=B9=E4=B8=BA=E5=8A=A8?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/controller/Base.php | 14 ++ application/common/model/Base.php | 11 + application/index/controller/Index.php | 47 +++- application/index/view/index/index.html | 16 +- application/index/view/index/welcome.html | 8 +- application/system/common.php | 1 + application/system/controller/Index.php | 10 + application/system/controller/SystemBase.php | 102 +++++++++ application/system/model/SystemBase.php | 10 + .../system/view/system_base/index.html | 200 ++++++++++++++++++ config/database.php | 4 +- config/index/app.php | 6 + config/system/app.php | 5 + public/MannMitDerTarnjacke_022.ico | Bin 0 -> 99678 bytes public/favicon.ico | Bin 1150 -> 99678 bytes route/index.php | 2 +- route/system.php | 13 ++ 17 files changed, 432 insertions(+), 17 deletions(-) create mode 100644 application/common/controller/Base.php create mode 100644 application/common/model/Base.php create mode 100644 application/system/common.php create mode 100644 application/system/controller/Index.php create mode 100644 application/system/controller/SystemBase.php create mode 100644 application/system/model/SystemBase.php create mode 100644 application/system/view/system_base/index.html create mode 100644 config/index/app.php create mode 100644 config/system/app.php create mode 100644 public/MannMitDerTarnjacke_022.ico create mode 100644 route/system.php diff --git a/application/common/controller/Base.php b/application/common/controller/Base.php new file mode 100644 index 00000000..d08c6a82 --- /dev/null +++ b/application/common/controller/Base.php @@ -0,0 +1,14 @@ +order(['id'=>'desc']) + ->field('title,keywords,description') + ->limit(1) + ->find(); + + // 获取版本号 + $list->version = config('version'); + + // 模版赋值 + $this->assign('list',$list); + + // $url = url('welcome'); + // halt($url); + + // 渲染输出 return $this->fetch(); } public function welcome() { + //实例化数据模型 + $sysbasemod = new sysbasemod(); + + // 查询最新记录 + $list = $sysbasemod + ->order(['id'=>'desc']) + ->field('title,copyright,thinks') + ->limit(1) + ->find(); + + // 获取版本号 + $list->version = config('version'); + + // 模版赋值 + $this->assign('list',$list); + + // $url = url('welcome'); + // halt($url); + + // 渲染输出 return $this->fetch(); } } diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html index ad4b6cea..253f9c4f 100644 --- a/application/index/view/index/index.html +++ b/application/index/view/index/index.html @@ -25,15 +25,15 @@ -H-ui.admin v3.1 - - +{$list.title} + +