diff --git a/frontend/controllers/MarketingStrategyController.php b/frontend/controllers/MarketingStrategyController.php index f675186..1753cf1 100644 --- a/frontend/controllers/MarketingStrategyController.php +++ b/frontend/controllers/MarketingStrategyController.php @@ -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; } diff --git a/frontend/views/insurer/my-list-info.php b/frontend/views/insurer/my-list-info.php index 4b19c0d..691c475 100644 --- a/frontend/views/insurer/my-list-info.php +++ b/frontend/views/insurer/my-list-info.php @@ -297,7 +297,9 @@ use common\models\PriceT; html += ''; if(sub_item.selected == 1) - html += '
' + sub_item.name + '
'; + html += '
' + sub_item.name; + html += ''; + html += '
'; }); html += '';