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}

+ class="mdi mdi-file-document fa-1-5x">
@@ -34,8 +34,8 @@
-

用户总数

-

920,000

+

用户数量

+

{$user_count}

@@ -47,11 +47,11 @@
-

下载总量

-

34,005,000

+

友情链接

+

{$friend_link_count}

+ class="mdi mdi-link-variant fa-1-5x">
@@ -60,8 +60,8 @@
-

新增留言

-

153 条

+

在线留言

+

{$message_form_count}条

@@ -93,111 +93,7 @@
- - -
- -
-
-
-

项目信息

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#项目名称开始日期截止日期状态进度
11112021-02-23 22:12:112021-02-23 22:12:11未开始 -
-
-
-
11112021-02-23 22:12:112021-02-23 22:12:11进行中 -
-
-
-
11112021-02-23 22:12:112021-02-23 22:12:11已完成 -
-
-
-
11112021-02-23 22:12:112021-02-23 22:12:11维护中 -
-
-
-
11112021-02-23 22:12:112021-02-23 22:12:11已终止 -
-
-
-
11112021-02-23 22:12:112021-02-23 22:12:11未开始 -
-
-
-
-
-
-
-
- -
-