Authored by 郭成尧

品牌一览Banner通过资源码配置

@@ -30,10 +30,11 @@ class BrandModel @@ -30,10 +30,11 @@ class BrandModel
30 /** 30 /**
31 * 根据频道获取品牌一览数据 31 * 根据频道获取品牌一览数据
32 * 32 *
  33 + * @param $code 资源码
33 * @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道 34 * @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
34 * @return array 35 * @return array
35 */ 36 */
36 - public static function getBrandByChannel($channel) 37 + public static function getBrandByChannel($code,$channel)
37 { 38 {
38 $result = array(); 39 $result = array();
39 $brand = array(); 40 $brand = array();
@@ -56,21 +57,23 @@ class BrandModel @@ -56,21 +57,23 @@ class BrandModel
56 $channels[$channel-1]['active'] = true; 57 $channels[$channel-1]['active'] = true;
57 $result['channels'] = $channels; 58 $result['channels'] = $channels;
58 59
  60 + // tar modified 通过资源位获取数据
59 /* 根据频道调用接口 */ 61 /* 根据频道调用接口 */
60 - switch (intval($channel)) {  
61 - case 1: // 男生  
62 - $brand = BrandData::package(self::CODE_TOPPOS_BOYS, 1);  
63 - break;  
64 - case 2: // 女生  
65 - $brand = BrandData::package(self::CODE_TOPPOS_GIRLS, 2);  
66 - break;  
67 - case 3: // 潮童  
68 - $brand = BrandData::package(self::CODE_TOPPOS_KIDS, 3);  
69 - break;  
70 - case 4: // 创意生活  
71 - $brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4);  
72 - break;  
73 - } 62 +// switch (intval($channel)) {
  63 +// case 1: // 男生
  64 +// $brand = BrandData::package(self::CODE_TOPPOS_BOYS, 1);
  65 +// break;
  66 +// case 2: // 女生
  67 +// $brand = BrandData::package(self::CODE_TOPPOS_GIRLS, 2);
  68 +// break;
  69 +// case 3: // 潮童
  70 +// $brand = BrandData::package(self::CODE_TOPPOS_KIDS, 3);
  71 +// break;
  72 +// case 4: // 创意生活
  73 +// $brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4);
  74 +// break;
  75 +// }
  76 + $brand = BrandData::package($code, intval($channel));
74 77
75 // 模板中的使用JS标识 78 // 模板中的使用JS标识
76 $result['brandPage'] = true; 79 $result['brandPage'] = true;
@@ -18,7 +18,7 @@ class BrandController extends AbstractAction @@ -18,7 +18,7 @@ class BrandController extends AbstractAction
18 public function indexAction() 18 public function indexAction()
19 { 19 {
20 $this->setTitle('品牌一览'); 20 $this->setTitle('品牌一览');
21 - $this->setNavHeader('品牌一览', '/boys?go=1&t=' . time(), false); 21 + $this->setNavHeader('品牌一览', '/boys?go=1&t=' . time(), true);
22 22
23 /* 判断参数是否有效 */ 23 /* 判断参数是否有效 */
24 $channel = null; 24 $channel = null;
@@ -39,11 +39,15 @@ class BrandController extends AbstractAction @@ -39,11 +39,15 @@ class BrandController extends AbstractAction
39 $channel = 1; 39 $channel = 1;
40 } 40 }
41 } 41 }
42 - 42 +// $code = $this->get('code');
  43 + // tar test 1505061525
  44 + $code = 'ce6ac059493ec26241a8cbe0bfa1b17a';
  45 + $channel = Category\BrandModel::getBrandByChannel($code,$channel);
  46 +// \Plugin\DataProcess\CouponFloorProcess::debugOut($channel);
43 // 渲染模板 47 // 渲染模板
44 $this->_view->display('index', array( 48 $this->_view->display('index', array(
45 'brandPage' => true, 49 'brandPage' => true,
46 - 'channel' => Category\BrandModel::getBrandByChannel($channel) 50 + 'channel' => $channel
47 )); 51 ));
48 } 52 }
49 53