Authored by Rock Zhang

有货判断商品详情页中商品是否售罄的逻辑

Code Review By Rock Zhang
@@ -264,7 +264,7 @@ class DetailModel @@ -264,7 +264,7 @@ class DetailModel
264 'numInCart' => 0, 264 'numInCart' => 0,
265 'goodsInstore' => $baseInfo['storage'], // 库存量 265 'goodsInstore' => $baseInfo['storage'], // 库存量
266 ); 266 );
267 - $soldOut = ($baseInfo['storage'] == 0) || ($baseInfo['status'] == 0); 267 + $soldOut = ($baseInfo['storage'] == 0) || ($baseInfo['status'] == 0 || $totalStorageNum === 0);
268 $notForSale = $baseInfo['attribute'] == 2; 268 $notForSale = $baseInfo['attribute'] == 2;
269 // 显示加入购物车链接 269 // 显示加入购物车链接
270 if (!$soldOut && !$notForSale) { 270 if (!$soldOut && !$notForSale) {