...
|
...
|
@@ -319,4 +319,53 @@ class HomeModel |
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取频道选择页数据
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getChannel(){
|
|
|
$result = array();
|
|
|
$result['showYohood'] = false;
|
|
|
|
|
|
$data = IndexData::channelData();
|
|
|
|
|
|
$channelList = array();
|
|
|
if(isset($data['data']['list'])){
|
|
|
foreach($data['data']['list'] as $key => $value){
|
|
|
switch ($value['channel_id']) {
|
|
|
case 5:
|
|
|
$result['showYohood'] = true;
|
|
|
$result['yohoodHref'] = '/yohood';
|
|
|
break;
|
|
|
case 1:
|
|
|
$channelList[$key]['href'] = '/boys';
|
|
|
$channelList[$key]['title'] = '男生';
|
|
|
$channelList[$key]['entitle'] = 'BOYS';
|
|
|
break;
|
|
|
case 2:
|
|
|
$channelList[$key]['href'] = '/girls';
|
|
|
$channelList[$key]['title'] = '女生';
|
|
|
$channelList[$key]['entitle'] = 'GIRLS';
|
|
|
break;
|
|
|
case 3:
|
|
|
$channelList[$key]['href'] = '/kids';
|
|
|
$channelList[$key]['title'] = '潮童';
|
|
|
$channelList[$key]['entitle'] = 'KIDS';
|
|
|
break;
|
|
|
case 4:
|
|
|
$channelList[$key]['href'] = '/lifestyle';
|
|
|
$channelList[$key]['title'] = '创意生活';
|
|
|
$channelList[$key]['entitle'] = 'LIFESTYLE';
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
$result['channelList'] = $channelList;
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|