From 1e005a15c4918e64d6d604b85dd00799c53b5d7a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 28 Feb 2023 13:57:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B916?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Index.php | 69 ++++++++------------- app/admin/view/index/main2.html | 104 ++++++++++++++++++++++++++++++++ app/admin/view/index/main3.html | 63 +++++++++++++++++++ 3 files changed, 191 insertions(+), 45 deletions(-) create mode 100644 app/admin/view/index/main2.html create mode 100644 app/admin/view/index/main3.html diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 9248c37..ea75c50 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -44,57 +44,36 @@ class Index extends BaseController public function main() { - $street_id=Db::table('fa_szxc_information_useraddress')->where('admin_id',$this->adminInfo['id'])->value('street_id'); $street_name=Db::table('fa_geo_street')->where('street_code',$street_id)->value('street_name'); if ($this->adminInfo['group_access']==4){ $urls="http://zhen.lihaink.cn/#/?street_id=$street_id"."&street_name=".$street_name; - return << - 跳转大屏 - - - - -EOT; + View::assign('urls',$urls); + return View('main3'); }elseif($this->adminInfo['group_access']==5){ + $day_price=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id) + ->where('status',1) + ->whereDay('create_time') + ->sum('product_price'); + $day_order=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id) + ->where('status',1) + ->whereDay('create_time') + ->count(); + $Month_price=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id) + ->where('status',1) + ->whereMonth('create_time') + ->sum('product_price'); + $Month_order=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id) + ->where('status',1) + ->whereMonth('create_time') + ->count(); $urls="http://zhenqiye.lihaink.cn/#/?street_id=$street_id"."&street_name=".$street_name; - return << - 跳转大屏 - - - - -EOT; + View::assign('urls',$urls); + View::assign('day_order',$day_order); + View::assign('day_price',$day_price); + View::assign('month_price',$Month_price); + View::assign('month_order',$Month_order); + return View('main2'); } if ($this->adminInfo['id']!=1){ $find = Db::table('fa_szxc_information_useraddress')->where('user_id', $this->adminInfo['user_id'])->find(); diff --git a/app/admin/view/index/main2.html b/app/admin/view/index/main2.html new file mode 100644 index 0000000..2302dfd --- /dev/null +++ b/app/admin/view/index/main2.html @@ -0,0 +1,104 @@ +{extend name="common/base"/} +{block name="style"} + +{/block} + +{block name="body"} +
+
+
+
+
今日订单金额
+
+
{$day_price}
+ + + + + + + +
+
+
+
+
+
今日订单数
+
+
{$day_order}
+
+
+
+
+
+
当月订单金额
+
+
{$month_price}
+
+
+
+
+
+
当月订单数
+
+
{$month_order}
+
+
+
+
+ + + +
+{/block} + + + +{block name="script"} + + + +{/block} + \ No newline at end of file diff --git a/app/admin/view/index/main3.html b/app/admin/view/index/main3.html new file mode 100644 index 0000000..9fdc189 --- /dev/null +++ b/app/admin/view/index/main3.html @@ -0,0 +1,63 @@ +{extend name="common/base"/} +{block name="style"} + +{/block} + +{block name="body"} + + + + + +{/block} + + + +{block name="script"} + + + +{/block} + \ No newline at end of file