From 7e1b996c21bf33e8ac1ce84c9ce1a3fac5c18474 Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Fri, 31 May 2024 11:53:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E8=A3=85Es=E5=95=86=E5=93=81=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/GoodsNew.php | 4 ++-- app/common/service/GoodsEs.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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); }