code review by hf: do modify union duomai goods id param
Showing
1 changed file
with
6 additions
and
2 deletions
@@ -446,9 +446,13 @@ class UnionTrans | @@ -446,9 +446,13 @@ class UnionTrans | ||
446 | continue; | 446 | continue; |
447 | } | 447 | } |
448 | foreach ($value['goods_list'] as $goods) { | 448 | foreach ($value['goods_list'] as $goods) { |
449 | - if ($goods['color_name'] === $color && strpos($image, $goods['images_url']) !== false) { | 449 | + // 通过颜色找商品ID |
450 | + if ($goods['color_name'] === $color) { | ||
450 | $goodsId = $goods['goods_id']; | 451 | $goodsId = $goods['goods_id']; |
451 | - break; | 452 | + // 判断缩略图是否一致 (没办法!没有提供专用的接口返回,没有SKC) |
453 | + if (strpos($image, $goods['images_url']) !== false) { | ||
454 | + break; | ||
455 | + } | ||
452 | } | 456 | } |
453 | } | 457 | } |
454 | } | 458 | } |
-
Please register or login to post a comment