Authored by Rock Zhang

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

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Home\IndexData; 4 use LibModels\Wap\Home\IndexData;
  5 +use Plugin\Helpers;
5 6
6 /** 7 /**
7 * 频道选择 8 * 频道选择
@@ -14,31 +15,21 @@ class IndexController extends AbstractAction @@ -14,31 +15,21 @@ class IndexController extends AbstractAction
14 */ 15 */
15 public function indexAction() 16 public function indexAction()
16 { 17 {
  18 + $data = array();
17 19
18 - $data = array(  
19 - 'channels' => array(  
20 - array(  
21 - 'name' => '男生',  
22 - 'name_en' => 'BOYS',  
23 - 'url' => '/boys'  
24 - ),  
25 - array(  
26 - 'name' => '男生',  
27 - 'name_en' => 'BOYS',  
28 - 'url' => '/boys'  
29 - ),  
30 - array(  
31 - 'name' => '男生',  
32 - 'name_en' => 'BOYS',  
33 - 'url' => '/boys'  
34 - ),  
35 - array(  
36 - 'name' => '男生',  
37 - 'name_en' => 'BOYS',  
38 - 'url' => '/boys'  
39 - ),  
40 - )  
41 - ); 20 + // 背景图获取
  21 + $banner = IndexData::getBannerStart();
  22 + if($banner['code'] == 200)
  23 + {
  24 + foreach ($banner['data'] as $item) {
  25 + foreach ($item['data']['list'] as $val) {
  26 + $data['background'] = Helpers::getImageUrl($val['src'], 640, 800, 1);
  27 + }
  28 + }
  29 + }
  30 +
  31 + echo '<pre>';
  32 + print_r($data);exit;
42 33
43 $this->_view->assign('title', 'YOHO!有货'); 34 $this->_view->assign('title', 'YOHO!有货');
44 $this->_view->display('index', $data); 35 $this->_view->display('index', $data);