Authored by Rock Zhang

首页添加话题,搭配的more的url

... ... @@ -9,7 +9,7 @@ use Plugin\Helpers;
*/
class FloorProcess
{
private static $guangUrl = 'http://guang.m.yohobuy.com';
/**
* 频道参数
*
... ... @@ -218,20 +218,29 @@ class FloorProcess
{
$result = array();
foreach ($data['article'] as &$one) {
foreach($data as $key=>&$value){
if($key == 'title'){
$value['more_url'] = self::$guangUrl.'?id=2&gender='.self::$channel[$type];
}
if($key == 'article'){
foreach($value as &$one){
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 400, 400);
unset($one['src']);
}
foreach ($data['recommend_collocation'] as &$one) {
}
if($key == 'recommend_collocation'){
foreach($value as &$one){
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 140, 140);
unset($one['src']);
}
}
}
$result['trendColloaction'] = $data;
return $result;
... ... @@ -247,13 +256,20 @@ class FloorProcess
{
$result = array();
foreach ($data['list'] as &$one) {
foreach($data as $key=>&$value){
if($key == 'title'){
$value['more_url'] = self::$guangUrl.'?id=1&gender='.self::$channel[$type];
}
if($key == 'list'){
foreach ($value as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 580, 360);
unset($one['src']);
}
}
}
$result['trendTopics'] = $data;
return $result;
... ...