|
|
@@ -136,12 +136,15 @@ class DeliveryQuoteUtil
|
|
|
private static function calculateTotalWeight($productList)
|
|
|
{
|
|
|
$weight = 0;
|
|
|
- foreach ($productList as $itemData) {
|
|
|
- $bigNum = $itemData['bigNum'] ?? 0;
|
|
|
- $thisWeight = $itemData['weight'] ?? 0;
|
|
|
- $currentWeight = bcmul($thisWeight, $bigNum, 2);
|
|
|
- $weight = bcadd($currentWeight, $weight, 2);
|
|
|
- }
|
|
|
+// foreach ($productList as $itemData) {
|
|
|
+// $bigNum = $itemData['bigNum'] ?? 0;
|
|
|
+// $thisWeight = $itemData['weight'] ?? 0;
|
|
|
+// $currentWeight = bcmul($thisWeight, $bigNum, 2);
|
|
|
+// $weight = bcadd($currentWeight, $weight, 2);
|
|
|
+// }
|
|
|
+ // TODO 先默认都是 1 公斤
|
|
|
+ $weight = 1;
|
|
|
+
|
|
|
return $weight;
|
|
|
}
|
|
|
|