Commit 8f9ce3ee by 杨树贤

优化兼容

parent 920d82b0
Showing with 4 additions and 2 deletions
...@@ -87,6 +87,9 @@ class SkuService ...@@ -87,6 +87,9 @@ class SkuService
if (!empty($sku['ladder_price'])) { if (!empty($sku['ladder_price'])) {
$priceService = new PriceService(); $priceService = new PriceService();
$moqPrice = $priceService->getMoqPrice($sku['ladder_price']); $moqPrice = $priceService->getMoqPrice($sku['ladder_price']);
if (!is_array($sku['ladder_price'])) {
$sku['ladder_price'] = json_decode($sku['ladder_price'], true);
}
foreach ($sku['ladder_price'] as &$ladder) { foreach ($sku['ladder_price'] as &$ladder) {
$ladder['purchases'] = $ladder['purchases'] == 0 ? $sku['moq'] : $ladder['purchases']; $ladder['purchases'] = $ladder['purchases'] == 0 ? $sku['moq'] : $ladder['purchases'];
} }
...@@ -430,4 +433,4 @@ class SkuService ...@@ -430,4 +433,4 @@ class SkuService
{ {
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment