Authored by Rock Zhang

修改频道选择页传递的数据格式“

... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData;
use Plugin\Helpers;
/**
* 频道选择
... ... @@ -14,31 +15,21 @@ class IndexController extends AbstractAction
*/
public function indexAction()
{
$data = array();
$data = array(
'channels' => array(
array(
'name' => '男生',
'name_en' => 'BOYS',
'url' => '/boys'
),
array(
'name' => '男生',
'name_en' => 'BOYS',
'url' => '/boys'
),
array(
'name' => '男生',
'name_en' => 'BOYS',
'url' => '/boys'
),
array(
'name' => '男生',
'name_en' => 'BOYS',
'url' => '/boys'
),
)
);
// 背景图获取
$banner = IndexData::getBannerStart();
if($banner['code'] == 200)
{
foreach ($banner['data'] as $item) {
foreach ($item['data']['list'] as $val) {
$data['background'] = Helpers::getImageUrl($val['src'], 640, 800, 1);
}
}
}
echo '<pre>';
print_r($data);exit;
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', $data);
... ...