|
|
|
@ -632,8 +632,10 @@ class MarketingStrategyController extends UserBaseController |
|
|
|
|
->where(['order_id'=>$order_id,'gift_type'=>$type]) |
|
|
|
|
->all(); |
|
|
|
|
$order_gift_ids = []; |
|
|
|
|
$order_gift_srcs = []; |
|
|
|
|
foreach($order_gift_items as $order_gift_item) { |
|
|
|
|
$order_gift_ids[] = $order_gift_item->gift_id; |
|
|
|
|
$order_gift_srcs[$order_gift_item->gift_id] = $order_gift_item->gift_src; |
|
|
|
|
} |
|
|
|
|
$gifts = ZhongjiGiftT::find() |
|
|
|
|
->where(['fanxian_id'=>$fanxian_id,'gift_type'=>$type]) |
|
|
|
@ -647,6 +649,7 @@ class MarketingStrategyController extends UserBaseController |
|
|
|
|
foreach($tmp_row['gifts'] as $index => $gift_info) { |
|
|
|
|
if(in_array($gift_info['id'], $order_gift_ids)) { |
|
|
|
|
$tmp_row['gifts'][$index]['selected'] = 1; |
|
|
|
|
$tmp_row['gifts'][$index]['img_src'] = $order_gift_srcs[$gift_info['id']]; |
|
|
|
|
} else { |
|
|
|
|
$tmp_row['gifts'][$index]['selected'] = 0; |
|
|
|
|
} |
|
|
|
|