From 15073e3ec749362421dd15ed8c4bee79d2caf378 Mon Sep 17 00:00:00 2001 From: liyukun <1099438829@qq.com> Date: Mon, 24 Jan 2022 01:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=BB=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Index.php | 16 ++++- app/admin/view/index/main.html | 124 +++------------------------------ 2 files changed, 23 insertions(+), 117 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index de92309..46f96d6 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -3,13 +3,15 @@ namespace app\admin\controller; use app\common\model\AdminAuth; -use app\common\model\AdminNotify; -use app\Request; -use app\admin\extend\Util as Util; +use app\common\model\Document; +use app\common\model\DocumentCategory; +use app\common\model\MessageForm; use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; +use \app\common\model\User; +use \app\common\model\FriendLink; class Index extends AuthController { @@ -39,6 +41,14 @@ class Index extends AuthController */ public function main() { + $documentCount = Document::counts(new Document()); + $this->assign("document_count", $documentCount); + $userCount = User::counts(new User()); + $this->assign("user_count", $userCount); + $FriendLinkCount = FriendLink::counts(new FriendLink()); + $this->assign("friend_link_count", $FriendLinkCount); + $messageFormCount = MessageForm::counts(new MessageForm()); + $this->assign("message_form_count", $messageFormCount); return $this->fetch(); } diff --git a/app/admin/view/index/main.html b/app/admin/view/index/main.html index 2ae1e90..b92d534 100644 --- a/app/admin/view/index/main.html +++ b/app/admin/view/index/main.html @@ -21,11 +21,11 @@
今日收入
-102,125.00
+新闻文章
+{$document_count}
用户总数
-920,000
+用户数量
+{$user_count}
下载总量
-34,005,000
+友情链接
+{$friend_link_count}
新增留言
-153 条
+在线留言
+{$message_form_count}条
| # | -项目名称 | -开始日期 | -截止日期 | -状态 | -进度 | -
|---|---|---|---|---|---|
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -未开始 | -
-
-
-
- |
-
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -进行中 | -
-
-
-
- |
-
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -已完成 | -
-
-
-
- |
-
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -维护中 | -
-
-
-
- |
-
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -已终止 | -
-
-
-
- |
-
| 1 | -111 | -2021-02-23 22:12:11 | -2021-02-23 22:12:11 | -未开始 | -
-
-
-
- |
-