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]); } /**