code review by hf: merge zhangzhen code to fixes home floor bugs
Showing
1 changed file
with
10 additions
and
9 deletions
@@ -9,6 +9,7 @@ use Plugin\Helpers; | @@ -9,6 +9,7 @@ use Plugin\Helpers; | ||
9 | */ | 9 | */ |
10 | class FloorProcess | 10 | class FloorProcess |
11 | { | 11 | { |
12 | + | ||
12 | /** | 13 | /** |
13 | * 频道参数 | 14 | * 频道参数 |
14 | * | 15 | * |
@@ -34,9 +35,9 @@ class FloorProcess | @@ -34,9 +35,9 @@ class FloorProcess | ||
34 | 35 | ||
35 | $build = array(); | 36 | $build = array(); |
36 | foreach ($data['list'] as $v) { | 37 | foreach ($data['list'] as $v) { |
37 | - if (empty($v)) { | ||
38 | - continue; | ||
39 | - } | 38 | + if (empty($v)) { |
39 | + continue; | ||
40 | + } | ||
40 | 41 | ||
41 | $fun = $v['template_name']; | 42 | $fun = $v['template_name']; |
42 | if (empty($v['data']) || !is_callable("self::$fun")) { | 43 | if (empty($v['data']) || !is_callable("self::$fun")) { |
@@ -207,7 +208,7 @@ class FloorProcess | @@ -207,7 +208,7 @@ class FloorProcess | ||
207 | foreach ($data['list'] as &$one) { | 208 | foreach ($data['list'] as &$one) { |
208 | if (isset($one['url'])) { | 209 | if (isset($one['url'])) { |
209 | $one['url'] = Helpers::getFilterUrl($one['url']); | 210 | $one['url'] = Helpers::getFilterUrl($one['url']); |
210 | - isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type]; | 211 | + isset(self::$channel[$type]) && $one['url'] .= '?gender=' . self::$channel[$type]; |
211 | } | 212 | } |
212 | $one['img'] = Helpers::getImageUrl($one['src'], 158, 174); | 213 | $one['img'] = Helpers::getImageUrl($one['src'], 158, 174); |
213 | unset($one['src']); | 214 | unset($one['src']); |
@@ -303,11 +304,11 @@ class FloorProcess | @@ -303,11 +304,11 @@ class FloorProcess | ||
303 | unset($one['src']); | 304 | unset($one['src']); |
304 | } | 305 | } |
305 | 306 | ||
306 | - // 区别多张图与一张图 | ||
307 | - if (count($data['big_image']) > 1) { | ||
308 | - $result['big_image']['big_list'] = $data['big_image']; | ||
309 | - unset($data['big_image']); | ||
310 | - } | 307 | + // 区别多张图与一张图 |
308 | + if (count($data['big_image']) > 1) { | ||
309 | + $result['big_image']['big_list'] = $data['big_image']; | ||
310 | + unset($data['big_image']); | ||
311 | + } | ||
311 | 312 | ||
312 | foreach ($data['list'] as $kk => &$one) { | 313 | foreach ($data['list'] as $kk => &$one) { |
313 | if ($kk == 0) { | 314 | if ($kk == 0) { |
-
Please register or login to post a comment