From 877dbb24fe81e9e0735cb4f6e726140c83fc6c95 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 10 Jun 2022 10:18:24 +0800 Subject: [PATCH] setter --- app/controller/manager/mall/Order.php | 15 +++++++++++++-- .../js/lay-module/wangEditor/fonts/w-e-icon.woff | Bin 6224 -> 0 bytes public/static/manager/js/mall/order.js | 5 +++++ view/manager/mall/order/index.html | 8 ++++++++ view/manager/mall/order/info.html | 5 +---- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/app/controller/manager/mall/Order.php b/app/controller/manager/mall/Order.php index 5e952b6..45fcf6f 100755 --- a/app/controller/manager/mall/Order.php +++ b/app/controller/manager/mall/Order.php @@ -101,6 +101,7 @@ class Order extends Base $isScore = $searchParams['is_score'] ?? 0; $whereMap = []; + $userWhereMap = []; $order = ['id' => 'desc']; $whereMap[] = ['is_score', '=', $isScore]; @@ -130,9 +131,19 @@ class Order extends Base if (isset($searchParams['phone']) && !empty($searchParams['phone'])) { $whereMap[] = ['phone', 'like', "%".$searchParams['phone']."%"]; } + if (isset($searchParams['nickname']) && !empty($searchParams['nickname'])) { + $userWhereMap[] = ['nickname', 'like', "%".$searchParams['nickname']."%"]; + } - $res = OrderModel::findList($whereMap, [], $page, $size, function ($q) { - return $q->with(['account']); + + $res = OrderModel::findList($whereMap, [], $page, $size, function ($q)use($userWhereMap) { + if (!empty($userWhereMap)) { + return $q->hasWhere('account', function ($query) use ($userWhereMap) { + $query->where($userWhereMap); + }); + } else { + return $q->with(['account']); + } }, $order); $res['list'] = $res['list']->each(function ($item) { diff --git a/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff b/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff index 6dc5b5a33ab856629748dba686540870da73e89f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100755 GIT binary patch literal 0 HcmV?d00001 literal 6224 zcmb7IeQX@Zb)VV2+r97G<=yU)Jo0qM<$aOj*WK+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_NqgQ_D*$ z+0% +
+ +
+ +
+
+ +
diff --git a/view/manager/mall/order/info.html b/view/manager/mall/order/info.html index 5485de3..e6d4541 100755 --- a/view/manager/mall/order/info.html +++ b/view/manager/mall/order/info.html @@ -16,10 +16,7 @@ 订单状态:{$statusList[$item['status']] ?? ''} - 应付总价(元): -
- -
+ 应付总价(元):{$item.original_price ?? ''} 下单时间:{$item.created_at ?? ''}