From 87ed07465aae33ef2b521a773c7f329cc9a001c6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 10 Nov 2023 11:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Statistics.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/api/Statistics.php b/app/controller/api/Statistics.php index 530e32cd..2ecbda3e 100644 --- a/app/controller/api/Statistics.php +++ b/app/controller/api/Statistics.php @@ -109,10 +109,11 @@ class Statistics extends BaseController if (isset($parmas['keyword']) && $parmas['keyword'] != '') { $where[] = ['store_name', 'like', '%' . $parmas['keyword'] . '%']; } + $count=Db::name('store_product')->where($where)->count(); $list = Db::name('store_product')->where($where)->page($parmas['page']) ->field('product_id,store_name,image,price') ->limit(10)->select(); - return app('json')->success(['page' => $parmas['page'], 'data' => $list]); + return app('json')->success(['page' => $parmas['page'], 'data' => $list,'count'=>$count]); } /**