Authored by hf

code review by fei.hong: do merge zhifeng.liang codes to home floor

... ... @@ -12,8 +12,8 @@ class FloorProcess
/**
* 频道参数
*
* @var array
*
* @var array
*/
private static $channel = array(
'1' => '1,3',
... ... @@ -90,7 +90,7 @@ class FloorProcess
/**
* 图标列表数据处理方法
*
*
* @param array $data 图标列表数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的图标列表数据
... ... @@ -111,7 +111,7 @@ class FloorProcess
/**
* 单广告图片数据处理方法
*
*
* @param array $data 单图片数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的单图片数据
... ... @@ -162,7 +162,7 @@ class FloorProcess
/**
* 带标题的12个小图推荐数据处理方法
*
*
* @param array $data 带标题的12个小图推荐数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的带标题的12个小图推荐数据
... ... @@ -269,11 +269,11 @@ class FloorProcess
foreach ($data as $key => &$value) {
if ($key == 'title') {
$urlParam = array('id' => 4);
// isset(self::$channel[$type]) && $urlParam['gender'] = self::$channel[$type];
$urlParam = array('id' => 4);
//isset(self::$channel[$type]) && $urlParam['gender'] = self::$channel[$type];
$value['more_url'] = Helpers::url('', $urlParam, 'guang');
}
if ($key == 'list') {
if ($key == 'list' && is_array($value)) {
foreach ($value as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
... ... @@ -379,19 +379,18 @@ class FloorProcess
*/
private static function small_pic($data, $type)
{
// 按照以前业务操作,不显示
return array();
$result = array();
foreach ($data as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 98, 98);
$one['img'] = Helpers::getImageUrl($one['src'], 275, 160);
unset($one['src']);
}
$result['small_pic'] = $data;
if (!empty($data)) {
$result['smallPic']['list'] = $data;
}
return $result;
}
... ... @@ -452,4 +451,4 @@ class FloorProcess
return $result;
}
}
}
\ No newline at end of file
... ...