From 64fc96d2df284c1527ae434cc9da3dc7a2dff41b Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 11 Nov 2025 09:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/GoodsCartService.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/service/GoodsCartService.php b/app/service/GoodsCartService.php index e7966c7ef..43c1cc436 100644 --- a/app/service/GoodsCartService.php +++ b/app/service/GoodsCartService.php @@ -362,6 +362,10 @@ class GoodsCartService { return $goods_base; } + // 规格库存赋值 + $goods['inventory'] = $goods_base['data']['spec_base']['inventory']; + // 规格最大限购 + $goods['buy_max_number'] = $goods_base['data']['spec_base']['buy_max_number']; // 是否存在规格 if(!empty($spec)) @@ -372,11 +376,6 @@ class GoodsCartService { $goods['images'] = $images; } - - // 规格库存赋值 - $goods['inventory'] = $goods_base['data']['spec_base']['inventory']; - // 规格最大限购 - $goods['buy_max_number'] = $goods_base['data']['spec_base']['buy_max_number']; } // 数量