From b0541d6d5ab72416ab0bf9cbf68d6b963c6ff5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Apr 2021 19:27:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/view/user/index.html | 2 +- app/data/controller/shop/Order.php | 3 +-- app/data/view/base/postage/company/index.html | 8 ++++---- app/data/view/shop/goods/index.html | 6 +++--- app/data/view/shop/order/index.html | 8 ++++---- app/data/view/shop/send/index.html | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/admin/view/user/index.html b/app/admin/view/user/index.html index 4ebdd0b5b..496802ae7 100644 --- a/app/admin/view/user/index.html +++ b/app/admin/view/user/index.html @@ -19,7 +19,7 @@ {/block} {block name="content"} -
+
    {foreach ['all'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v} {if isset($type) and $type eq $k} diff --git a/app/data/controller/shop/Order.php b/app/data/controller/shop/Order.php index ac40f12b5..0e58f59d6 100644 --- a/app/data/controller/shop/Order.php +++ b/app/data/controller/shop/Order.php @@ -52,8 +52,7 @@ class Order extends Controller // 状态数据统计 $this->total = ['t0' => 0, 't1' => 0, 't2' => 0, 't3' => 0, 't4' => 0, 't5' => 0, 't6' => 0, 'ta' => 0]; foreach ($this->app->db->name($this->table)->field('status,count(1) total')->group('status')->cursor() as $vo) { - $this->total["t{$vo['status']}"] = $vo['total']; - $this->total["ta"] += $vo['total']; + [$this->total["t{$vo['status']}"] = $vo['total'], $this->total["ta"] += $vo['total']]; } // 订单列表查询 $query = $this->_query($this->table); diff --git a/app/data/view/base/postage/company/index.html b/app/data/view/base/postage/company/index.html index b0c998214..f41d94862 100644 --- a/app/data/view/base/postage/company/index.html +++ b/app/data/view/base/postage/company/index.html @@ -23,13 +23,13 @@ {/block} {block name="content"} -
    +
      {foreach ['index'=>'快递公司','recycle'=>'回 收 站'] as $k=>$v} - {if $type eq $k} -
    • {$v}
    • + {if isset($type) and $type eq $k} +
    • {$v}
    • {else} -
    • {$v}
    • +
    • {$v}
    • {/if}{/foreach}
    diff --git a/app/data/view/shop/goods/index.html b/app/data/view/shop/goods/index.html index 3a9d6214e..69aece864 100644 --- a/app/data/view/shop/goods/index.html +++ b/app/data/view/shop/goods/index.html @@ -21,13 +21,13 @@ {/block} {block name="content"} -
    +
      {foreach ['index'=>'商品管理','recycle'=>'回 收 站'] as $k=>$v} {if isset($type) and $type eq $k} -
    • {$v}
    • +
    • {$v}
    • {else} -
    • {$v}
    • +
    • {$v}
    • {/if}{/foreach}
    diff --git a/app/data/view/shop/order/index.html b/app/data/view/shop/order/index.html index fe0b1baed..8349ebec9 100644 --- a/app/data/view/shop/order/index.html +++ b/app/data/view/shop/order/index.html @@ -9,11 +9,11 @@ {block name="content"}
      - {foreach ['ta'=>'全部订单','t2'=>'待支付的订单','t3'=>'待审核的订单','t4'=>'待发货的订单','t5'=>'待收货的订单','t6'=>'已完成的订单','t0'=>'已取消的订单'] as $k=>$v} - {if isset($type) and 't'.$type eq $k} -
    • {$v}{$total[$k]??0}
    • + {php}$types = ['ta' => '全部订单', 't2' => '待支付的订单', 't3' => '待审核的订单', 't4' => '待发货的订单', 't5' => '待收货的订单', 't6' => '已完成的订单', 't0' => '已取消的订单'];{/php} + {foreach $types as $k=>$v}{if isset($type) and 't'.$type eq $k} +
    • {$v}{$total[$k]??0}
    • {else} -
    • {$v}{$total[$k]??0}
    • +
    • {$v}{$total[$k]??0}
    • {/if}{/foreach}
    diff --git a/app/data/view/shop/send/index.html b/app/data/view/shop/send/index.html index 6807213b3..abcb54cf3 100644 --- a/app/data/view/shop/send/index.html +++ b/app/data/view/shop/send/index.html @@ -11,9 +11,9 @@
      {foreach ['ta'=>'全部订单','t1'=>'待发货的订单','t2'=>'已发货的订单','t0'=>'已取消的订单'] as $k => $v} {if isset($type) and 't'.$type eq $k} -
    • {$v}{$total[$k]??0}
    • +
    • {$v}{$total[$k]??0}
    • {else} -
    • {$v}{$total[$k]??0}
    • +
    • {$v}{$total[$k]??0}
    • {/if}{/foreach}