From 0a1dca9c313f3d4b2214c21c8cdec7284d107b06 Mon Sep 17 00:00:00 2001 From: "zhangf@suq.cn" Date: Tue, 8 Sep 2026 10:08:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(content):=20=E4=BF=AE=E5=A4=8D=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=88=86=E7=B1=BB=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改分类查询排序字段从 id asc 为 sort asc,id asc - 确保分类按照自定义排序字段进行排列 - 保持相同排序值时按 id 升序排列的逻辑 --- app/service/ContentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/ContentService.php b/app/service/ContentService.php index a758c4d..65e47fc 100644 --- a/app/service/ContentService.php +++ b/app/service/ContentService.php @@ -802,7 +802,7 @@ class ContentService { public function indexContent($param): \think\response\Json { $Cate = new Category(); - $cate = $Cate->getAllCustomArrayData(['seller_id'=>$param['seller_id'],'website_id'=>$param['website_id'],'lang'=>$param['lang']],'id asc','id,title,parent_id')['data']; + $cate = $Cate->getAllCustomArrayData(['seller_id'=>$param['seller_id'],'website_id'=>$param['website_id'],'lang'=>$param['lang']],'sort asc,id asc','id,title,parent_id')['data']; if(empty($cate)){ return json(['code' => 0, 'msg' => 'ok', 'count' => 0, 'data' => []]); }