Showing
1 changed file
with
6 additions
and
2 deletions
@@ -118,13 +118,17 @@ class Process | @@ -118,13 +118,17 @@ class Process | ||
118 | $height = 450; | 118 | $height = 450; |
119 | if ($data['focus_type'] == 1) { | 119 | if ($data['focus_type'] == 1) { |
120 | foreach ($data['data'] as $val) { | 120 | foreach ($data['data'] as $val) { |
121 | + $ret = array(); | ||
121 | $val['src'] = Images::getImageUrl($val['src'], $width, $height, 1); | 122 | $val['src'] = Images::getImageUrl($val['src'], $width, $height, 1); |
122 | $val['url'] = Helpers::transUrl($val['url'], $type); | 123 | $val['url'] = Helpers::transUrl($val['url'], $type); |
123 | - $temp[] = array( | 124 | + $ret = array ( |
124 | 'href' => $val['url'], | 125 | 'href' => $val['url'], |
125 | 'img' => $val['src'], | 126 | 'img' => $val['src'], |
126 | - 'bgColor' => $val['bgColor'] | ||
127 | ); | 127 | ); |
128 | + if(!empty($val['bgColor'])) { | ||
129 | + $ret['bgColor'] = $val['bgColor']; | ||
130 | + } | ||
131 | + $temp[] = $ret; | ||
128 | } | 132 | } |
129 | $result['slide']['list'] = $temp; | 133 | $result['slide']['list'] = $temp; |
130 | } | 134 | } |
-
Please register or login to post a comment