From 44cb688d9c4d5a301eb0f506edb30dfe3d6748bf Mon Sep 17 00:00:00 2001 From: From-wh Date: Tue, 27 Oct 2026 17:08:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=95=86=E5=93=81=E4=B8=AD=E5=8F=B0):=20?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=85=BC=E5=AE=B9=E6=97=A7=E7=89=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/product/CenterProductController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/app/api/controller/v1/product/CenterProductController.php b/backend/app/api/controller/v1/product/CenterProductController.php index 59d23990a..1be35250c 100644 --- a/backend/app/api/controller/v1/product/CenterProductController.php +++ b/backend/app/api/controller/v1/product/CenterProductController.php @@ -46,7 +46,18 @@ class CenterProductController ['limit', 30], ['ids', ''], ['store_label_id', ''], + // 旧版移动端列表页(goods_list/goods_cate/首页/微页专题)仍传 cid/sid/productId/coupon_category_id, + // DAO getSearchList 按旧语义处理:cid 含子分类下钻、sid 精确匹配、coupon_category_id 优惠券分类 + [['cid', 'd'], 0], + [['sid', 'd'], 0], + ['coupon_category_id', ''], + ['productId', ''], ]); + // 旧参数 productId 与 ids 同义(指定商品跳转),统一并入 ids 处理 + if (!empty($where['productId'])) { + $where['ids'] = $where['productId']; + } + unset($where['productId']); [$page, $limit] = $services->getPageValue(); // limit 强制整型并设上限,避免异常大分页 $limit = max(1, min(100, (int)($where['limit'] ?: $limit)));