diff --git a/app/controller/api/server/Store.php b/app/controller/api/server/Store.php index f64a2ba5..0f8c6d82 100644 --- a/app/controller/api/server/Store.php +++ b/app/controller/api/server/Store.php @@ -111,14 +111,14 @@ class Store extends BaseController foreach ($consumption['config'] as $k => $item) { if (empty($userConsumption) && in_array($merchant['type_id'], $item['type_id'])) { $saleTarget = $item['amount']; - $subsidyAmount = $saleTarget; + $subsidyAmount = $item['subsidy']; $purchaseTarget = bcmul($saleTarget, 0.5, 2); break; } if (!empty($userConsumption) && in_array($merchant['type_id'], $item['type_id'])) { $nextItem = $consumption['config'][$k + 1] ?? $item; $saleTarget = $nextItem['amount']; - $subsidyAmount = $saleTarget; + $subsidyAmount = $item['subsidy']; $purchaseTarget = bcmul($saleTarget, 0.5, 2); break; }