diff --git a/app/api/controller/GoodsNew.php b/app/api/controller/GoodsNew.php index 16679059..8b288617 100644 --- a/app/api/controller/GoodsNew.php +++ b/app/api/controller/GoodsNew.php @@ -25,9 +25,9 @@ class GoodsNew extends Controller } $params = ['goods_name' => $keyword]; $goodsService = new GoodsEs(); - $data = $goodsService->list($params, $page, $limit); + $list = $goodsService->list($params, $page, $limit); + $data['list'] = $list; $data['total'] = $goodsService->count(); - $data['list'] = $data; return $this->renderSuccess($data); } diff --git a/app/common/service/GoodsEs.php b/app/common/service/GoodsEs.php index ec3261bb..aa5aabf2 100644 --- a/app/common/service/GoodsEs.php +++ b/app/common/service/GoodsEs.php @@ -38,7 +38,6 @@ class GoodsEs ->like($params) ->from($page) ->size($limit) - ->order(['goods_id' => 'desc']) ->query(true); }