From bdf78a556ae1ea446d94dc8f6c661f47a070cbeb Mon Sep 17 00:00:00 2001 From: ahbmz Date: Wed, 19 Apr 2023 11:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E6=8E=92=E5=BA=8F=20?= =?UTF-8?q?=E4=BB=8E=E5=B0=8F=E5=88=B0=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/Content.php b/app/api/controller/Content.php index 981d306..8480fcf 100644 --- a/app/api/controller/Content.php +++ b/app/api/controller/Content.php @@ -145,7 +145,7 @@ class Content extends Base $_db = Db::name('product'); $_data = $_db->where('cate_id', $cate_id)->field('id,image,cate_id,title') ->where('status', 1) - ->page($page, $limit)->select(); + ->page($page, $limit)->order('sort DESC')->select(); $_data = $this->replace_img_http($_data->toArray()); return $this->result($_data, 1, ''); }