Showing
1 changed file
with
33 additions
and
17 deletions
@@ -9,7 +9,7 @@ use Plugin\Helpers; | @@ -9,7 +9,7 @@ use Plugin\Helpers; | ||
9 | */ | 9 | */ |
10 | class FloorProcess | 10 | class FloorProcess |
11 | { | 11 | { |
12 | - | 12 | + private static $guangUrl = 'http://guang.m.yohobuy.com'; |
13 | /** | 13 | /** |
14 | * 频道参数 | 14 | * 频道参数 |
15 | * | 15 | * |
@@ -218,19 +218,28 @@ class FloorProcess | @@ -218,19 +218,28 @@ class FloorProcess | ||
218 | { | 218 | { |
219 | $result = array(); | 219 | $result = array(); |
220 | 220 | ||
221 | - foreach ($data['article'] as &$one) { | ||
222 | - if (isset($one['url'])) { | ||
223 | - $one['url'] = Helpers::getFilterUrl($one['url']); | 221 | + foreach($data as $key=>&$value){ |
222 | + if($key == 'title'){ | ||
223 | + $value['more_url'] = self::$guangUrl.'?id=2&gender='.self::$channel[$type]; | ||
224 | } | 224 | } |
225 | - $one['img'] = Helpers::getImageUrl($one['src'], 400, 400); | ||
226 | - unset($one['src']); | ||
227 | - } | ||
228 | - foreach ($data['recommend_collocation'] as &$one) { | ||
229 | - if (isset($one['url'])) { | ||
230 | - $one['url'] = Helpers::getFilterUrl($one['url']); | 225 | + if($key == 'article'){ |
226 | + foreach($value as &$one){ | ||
227 | + if (isset($one['url'])) { | ||
228 | + $one['url'] = Helpers::getFilterUrl($one['url']); | ||
229 | + } | ||
230 | + $one['img'] = Helpers::getImageUrl($one['src'], 400, 400); | ||
231 | + unset($one['src']); | ||
232 | + } | ||
233 | + } | ||
234 | + if($key == 'recommend_collocation'){ | ||
235 | + foreach($value as &$one){ | ||
236 | + if (isset($one['url'])) { | ||
237 | + $one['url'] = Helpers::getFilterUrl($one['url']); | ||
238 | + } | ||
239 | + $one['img'] = Helpers::getImageUrl($one['src'], 140, 140); | ||
240 | + unset($one['src']); | ||
241 | + } | ||
231 | } | 242 | } |
232 | - $one['img'] = Helpers::getImageUrl($one['src'], 140, 140); | ||
233 | - unset($one['src']); | ||
234 | } | 243 | } |
235 | $result['trendColloaction'] = $data; | 244 | $result['trendColloaction'] = $data; |
236 | 245 | ||
@@ -247,12 +256,19 @@ class FloorProcess | @@ -247,12 +256,19 @@ class FloorProcess | ||
247 | { | 256 | { |
248 | $result = array(); | 257 | $result = array(); |
249 | 258 | ||
250 | - foreach ($data['list'] as &$one) { | ||
251 | - if (isset($one['url'])) { | ||
252 | - $one['url'] = Helpers::getFilterUrl($one['url']); | 259 | + foreach($data as $key=>&$value){ |
260 | + if($key == 'title'){ | ||
261 | + $value['more_url'] = self::$guangUrl.'?id=1&gender='.self::$channel[$type]; | ||
262 | + } | ||
263 | + if($key == 'list'){ | ||
264 | + foreach ($value as &$one) { | ||
265 | + if (isset($one['url'])) { | ||
266 | + $one['url'] = Helpers::getFilterUrl($one['url']); | ||
267 | + } | ||
268 | + $one['img'] = Helpers::getImageUrl($one['src'], 580, 360); | ||
269 | + unset($one['src']); | ||
270 | + } | ||
253 | } | 271 | } |
254 | - $one['img'] = Helpers::getImageUrl($one['src'], 580, 360); | ||
255 | - unset($one['src']); | ||
256 | } | 272 | } |
257 | $result['trendTopics'] = $data; | 273 | $result['trendTopics'] = $data; |
258 | 274 |
-
Please register or login to post a comment