Преглед изворни кода

客户端-京东服务商从京推推换成官方

sunxbiao пре 11 месеци
родитељ
комит
ec90a900f8
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      app/controller/api/store/product/Jd.php

+ 2 - 3
app/controller/api/store/product/Jd.php

@@ -492,14 +492,13 @@ class Jd extends BaseController
492 492
                     }
493 493
                     // 首次请求获取总页数
494 494
                     if ($page === 1 && isset($result['totalCount'])) {
495
-                        // $maxPage = max(1, (int)ceil($result['totalCount'] / 50));
495
+                        $maxPage = max(1, (int)ceil($result['totalCount'] / 50));
496 496
                     }
497 497
                     // 处理数据
498 498
                     if (!empty($result['data'])) {
499 499
                         $this->formatGoodsList($result['data'], $eliteId);
500 500
                     }
501 501
                     $page++;
502
-                    break;
503 502
                 } catch (\Exception $e) {
504 503
                     // 记录错误并继续下一个分类
505 504
                     log::info("JD API error (eliteId:{$eliteId}, page:{$page}): " . $e->getMessage());
@@ -573,7 +572,7 @@ class Jd extends BaseController
573 572
                 'commission_rate' => $goods['commissionInfo']['commissionShare'] ?? '',//佣金比例
574 573
                 'coupon_money' => $couponMoney,
575 574
                 'coupon_link' => $maxCoupon['link'],
576
-                'lowestCouponPrice' => decimal2($goods['priceInfo']['lowestCouponPrice']), //券后价lowestCouponPrice
575
+                'lowestCouponPrice' => decimal2($goods['purchasePriceInfo']['purchasePrice']?? ($goods['priceInfo']['lowestCouponPrice']?? $goods['priceInfo']['price'])), //券后价lowestCouponPrice
577 576
                 'price' => $goods['priceInfo']['price'], //价格
578 577
                 'imageList' => array_column($goods['imageInfo']['imageList'], 'url'), //图片合集
579 578
                 'materialUrl' => $goods['materialUrl']