Authored by xuqi

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -182,17 +182,19 @@ class NewsaleData @@ -182,17 +182,19 @@ class NewsaleData
182 * 获取热销排行榜商品数据 182 * 获取热销排行榜商品数据
183 * 183 *
184 * @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部 184 * @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
  185 + * $param integer $channel 1表示男,2表示女,3表示潮童,4表示创意生活
185 * @param string|null $sort 品类ID查询参数 186 * @param string|null $sort 品类ID查询参数
186 * @param integer|null $tab_id Tab的ID 187 * @param integer|null $tab_id Tab的ID
187 * @param integer $limit 查询返回的最大限制数, 默认为50 188 * @param integer $limit 查询返回的最大限制数, 默认为50
188 * @param integer $page 分页第几页, 默认第1页 189 * @param integer $page 分页第几页, 默认第1页
189 * @return array 新品到着商品数据 190 * @return array 新品到着商品数据
190 */ 191 */
191 - public static function getTopProducts($gender, $sort = null, $tab_id = null, $limit = 50, $page = 1) 192 + public static function getTopProducts($gender, $channel, $sort = null, $tab_id = null, $limit = 50, $page = 1)
192 { 193 {
193 $param = Yohobuy::param(); 194 $param = Yohobuy::param();
194 $param['method'] = 'app.search.top'; 195 $param['method'] = 'app.search.top';
195 $param['gender'] = $gender; 196 $param['gender'] = $gender;
  197 + $param['yh_channel'] = $gender;
196 !empty($sort) && $param['sort'] = $sort; 198 !empty($sort) && $param['sort'] = $sort;
197 !empty($tab_id) && $param['tab_id'] = $tab_id; 199 !empty($tab_id) && $param['tab_id'] = $tab_id;
198 $param['page'] = $page; 200 $param['page'] = $page;
@@ -144,6 +144,7 @@ class SearchData @@ -144,6 +144,7 @@ class SearchData
144 $param = array(); 144 $param = array();
145 $param['status'] = 1; // 是否上架,1表示在架,2表示不在 145 $param['status'] = 1; // 是否上架,1表示在架,2表示不在
146 $param['sales'] = 'Y'; // 只搜索销售的产品 146 $param['sales'] = 'Y'; // 只搜索销售的产品
  147 + $param['stocknumber'] = 1; // 过滤掉已售罄的商品
147 // $param['needFilter'] = 1; // 是否需要返回筛选条件 148 // $param['needFilter'] = 1; // 是否需要返回筛选条件
148 if (!isset($condition['order'])) { 149 if (!isset($condition['order'])) {
149 $param['order'] = $orderMaps['s_t_desc']; 150 $param['order'] = $orderMaps['s_t_desc'];
@@ -129,10 +129,10 @@ function searchResult() { @@ -129,10 +129,10 @@ function searchResult() {
129 129
130 brandHtml.push('<p><a href="' + brand.url + '">' + brand.name); 130 brandHtml.push('<p><a href="' + brand.url + '">' + brand.name);
131 if (brand.isNew) { 131 if (brand.isNew) {
132 - brandHtml.push('<i class="icon-hot">HOT</i>'); 132 + brandHtml.push('<i class="icon-new">NEW</i>');
133 } 133 }
134 if (brand.isHot) { 134 if (brand.isHot) {
135 - brandHtml.push('<i class="icon-new">NEW</i>'); 135 + brandHtml.push('<i class="icon-hot">HOT</i>');
136 } 136 }
137 brandHtml.push('</a></p>'); 137 brandHtml.push('</a></p>');
138 }); 138 });
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 var $ = require('jquery'); 6 var $ = require('jquery');
7 7
8 var loading = require('../plugin/loading'), 8 var loading = require('../plugin/loading'),
  9 + tip = require('../plugin/tip'),
9 Hammer = require('yoho.hammer'); 10 Hammer = require('yoho.hammer');
10 11
11 var theOrderCode = document.getElementById('ordercode').value; 12 var theOrderCode = document.getElementById('ordercode').value;
@@ -17,7 +18,7 @@ var appIconPosition = { @@ -17,7 +18,7 @@ var appIconPosition = {
17 baidu: '-2.7rem', 18 baidu: '-2.7rem',
18 weixin: '-1.2rem', 19 weixin: '-1.2rem',
19 QQ: '-5.4rem', 20 QQ: '-5.4rem',
20 - bank: '-4' 21 + bank: '-4rem'
21 }; 22 };
22 23
23 //隐藏微信分享选项 24 //隐藏微信分享选项
@@ -77,11 +78,11 @@ function callpay(orderCode) { @@ -77,11 +78,11 @@ function callpay(orderCode) {
77 jsApiParameters = res.data.jsApiParameters; 78 jsApiParameters = res.data.jsApiParameters;
78 jsApiCall(orderCode, jsApiParameters); 79 jsApiCall(orderCode, jsApiParameters);
79 } else { 80 } else {
80 - alert('微信支付调取失败'); 81 + tip.show('微信支付调取失败');
81 } 82 }
82 }, 83 },
83 error: function() { 84 error: function() {
84 - alert('请刷新本页面,完成微信支付'); 85 + tip.show('请刷新本页面,完成微信支付');
85 } 86 }
86 }); 87 });
87 } 88 }
@@ -99,11 +100,11 @@ function isWXOpen() { @@ -99,11 +100,11 @@ function isWXOpen() {
99 } 100 }
100 101
101 function hideWeChatPay() { 102 function hideWeChatPay() {
102 - var payApps = document.getElementsByClassName('app'); 103 + var $payApps = $('.app');
103 104
104 - [].forEach.call(payApps, function(app, index) {  
105 - if (app.innerHTML.indexOf('微信') !== -1) {  
106 - app.parentNode.style.display = 'none'; 105 + $payApps.each(function(idx, app) {
  106 + if ($(app).attr('id') === 'weixin') {
  107 + $(app).parent().css('display', 'none');
107 return false; 108 return false;
108 } 109 }
109 }); 110 });
@@ -117,29 +118,29 @@ function handleForWX() { @@ -117,29 +118,29 @@ function handleForWX() {
117 118
118 119
119 function setAppIcon(el, position) { 120 function setAppIcon(el, position) {
120 - el.style.backgroundPositionY = position; 121 + $(el).css('background-position-y', position);
121 } 122 }
122 123
123 function loadIcon() { 124 function loadIcon() {
124 - var boxs = document.getElementsByClassName('box');  
125 - var div = null; 125 + var $boxs = $('.box');
  126 + var $div = null;
126 var appid = null; 127 var appid = null;
127 128
128 - [].forEach.call(boxs, function(box, index) {  
129 - div = box.getElementsByClassName('icon')[0].getElementsByTagName('div')[0];  
130 - if (div) {  
131 - appid = box.getAttribute('id'); 129 + $boxs.each(function(idx, box) {
  130 + $div = $(box).find('.icon').find('div');
  131 + if ($div.length > 0) {
  132 + appid = $(box).attr('id');
132 if (appid !== 'alipay') { 133 if (appid !== 'alipay') {
133 - setAppIcon(div, appIconPosition[appid]); 134 + setAppIcon($div, appIconPosition[appid]);
134 } 135 }
135 } 136 }
136 }); 137 });
137 } 138 }
138 139
139 function showPage() { 140 function showPage() {
140 - var pageList = document.getElementsByClassName('payapp-list')[0]; 141 + var $pageList = $('.payapp-list');
141 142
142 - pageList.style.visibility = 'visible'; 143 + $pageList.css('visibility', 'visible');
143 } 144 }
144 145
145 if (wxHammer) { 146 if (wxHammer) {
@@ -64,11 +64,21 @@ lazyLoad(); @@ -64,11 +64,21 @@ lazyLoad();
64 headerNavHammer = new Hammer(document.getElementById('yoho-header')); 64 headerNavHammer = new Hammer(document.getElementById('yoho-header'));
65 65
66 headerNavHammer.on('tap', function(e) { 66 headerNavHammer.on('tap', function(e) {
67 - var suggestText = $('#suggest-textarea').val(); 67 + var suggestText = $('#suggest-textarea').val(),
  68 + textReg = /\S+/;
68 69
69 70
70 if ($(e.target).hasClass('nav-btn')) { 71 if ($(e.target).hasClass('nav-btn')) {
71 72
  73 + if (!textReg.test(suggestText)) {
  74 + diaLog.showDialog({
  75 + autoHide: true,
  76 + dialogText: '意见不能为空'
  77 + });
  78 +
  79 + return;
  80 + }
  81 +
72 $.ajax({ 82 $.ajax({
73 method: 'post', 83 method: 'post',
74 url: '/home/savesuggest', 84 url: '/home/savesuggest',
@@ -85,10 +95,18 @@ headerNavHammer.on('tap', function(e) { @@ -85,10 +95,18 @@ headerNavHammer.on('tap', function(e) {
85 setTimeout(function() { 95 setTimeout(function() {
86 location.pathname = 'home/suggest'; 96 location.pathname = 'home/suggest';
87 }, 2000); 97 }, 2000);
  98 + } else {
  99 + diaLog.showDialog({
  100 + autoHide: true,
  101 + dialogText: '提交失败~'
  102 + });
88 } 103 }
89 }).fail(function() { 104 }).fail(function() {
90 105
91 - //TODO 106 + diaLog.showDialog({
  107 + autoHide: true,
  108 + dialogText: '网络错误~'
  109 + });
92 }); 110 });
93 } 111 }
94 }); 112 });
@@ -16,7 +16,9 @@ var consultFooterEle = document.getElementById('consult-content-footer'), @@ -16,7 +16,9 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
16 navtabHammer = navtabEle && new Hammer(navtabEle), 16 navtabHammer = navtabEle && new Hammer(navtabEle),
17 17
18 gotoConsultEle = document.getElementById('goto-consult'), 18 gotoConsultEle = document.getElementById('goto-consult'),
19 - gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle); 19 + gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle),
  20 +
  21 + $gotoConsult = $('#goto-consult');
20 22
21 23
22 24
@@ -77,4 +79,22 @@ if (gotoConsultHammer) { @@ -77,4 +79,22 @@ if (gotoConsultHammer) {
77 gotoConsultHammer.on('tap', function() { 79 gotoConsultHammer.on('tap', function() {
78 location.href = $(gotoConsultEle).find('a').attr('href'); 80 location.href = $(gotoConsultEle).find('a').attr('href');
79 }); 81 });
80 -}  
  82 +}
  83 +
  84 +function fixConsultBar() {
  85 + if ($(window).scrollTop() > $('#yoho-header').outerHeight()) {
  86 + $gotoConsult.css('position', 'fixed');
  87 + $gotoConsult.css('top', '0');
  88 + } else {
  89 + $gotoConsult.css('position', 'static');
  90 + }
  91 +}
  92 +
  93 +//滚动时顶部固定 我要咨询
  94 +function scrollHandler() {
  95 + fixConsultBar();
  96 +}
  97 +
  98 +$(window).scroll(function() {
  99 + window.requestAnimationFrame(scrollHandler);
  100 +});
@@ -15,7 +15,10 @@ var goodsSwiper, @@ -15,7 +15,10 @@ var goodsSwiper,
15 var goodsDiscountEl = document.getElementById('goodsDiscount'), 15 var goodsDiscountEl = document.getElementById('goodsDiscount'),
16 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl); 16 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
17 17
18 -var $cart = $('.cart-bar'); 18 +var $cart = $('.cart-bar'),
  19 + $goodsSubtitle = $('.goodsSubtitle'),
  20 + divH,
  21 + $goodsSubtitleSpan;
19 22
20 require('./desc'); 23 require('./desc');
21 require('./comments-consults'); 24 require('./comments-consults');
@@ -82,4 +85,12 @@ $.ajax({ @@ -82,4 +85,12 @@ $.ajax({
82 } 85 }
83 }); 86 });
84 87
  88 +//限制goodsSubtitle为两行
  89 +if ($goodsSubtitle[0]) {
  90 + divH = $goodsSubtitle.height();
  91 + $goodsSubtitleSpan = $goodsSubtitle.find('span');
  92 + while ($goodsSubtitleSpan.outerHeight() > divH) {
  93 + $goodsSubtitleSpan.text($goodsSubtitleSpan.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, '...'));
  94 + }
  95 +}
85 require('./like'); 96 require('./like');
@@ -41,6 +41,8 @@ @@ -41,6 +41,8 @@
41 .goods-consults-page { 41 .goods-consults-page {
42 background-color: #f0f0f0; 42 background-color: #f0f0f0;
43 .goto-consult { 43 .goto-consult {
  44 + width: 100%;
  45 + box-sizing:border-box;
44 padding: 0 pxToRem(28px); 46 padding: 0 pxToRem(28px);
45 height: pxToRem(120px); 47 height: pxToRem(120px);
46 background-color: #ffffff; 48 background-color: #ffffff;
@@ -211,14 +211,19 @@ $basicBtnC:#eb0313; @@ -211,14 +211,19 @@ $basicBtnC:#eb0313;
211 background-color: #515150; 211 background-color: #515150;
212 } 212 }
213 .goodsSubtitle { 213 .goodsSubtitle {
214 - min-height: pxToRem(87px); 214 + height: pxToRem(88px);
215 font-size: pxToRem(24px); 215 font-size: pxToRem(24px);
216 - line-height: pxToRem(36px);  
217 color: $subFontC; 216 color: $subFontC;
218 padding-left: pxToRem(28px); 217 padding-left: pxToRem(28px);
219 padding-right: pxToRem(28px); 218 padding-right: pxToRem(28px);
  219 + padding-top: pxToRem(14px);
220 border-bottom: 1px solid $borderC; 220 border-bottom: 1px solid $borderC;
221 background-color: #f4f4f4; 221 background-color: #f4f4f4;
  222 + span{
  223 + display: block;
  224 + line-height: pxToRem(36px);
  225 + margin: 0;
  226 + }
222 } 227 }
223 .price-date { 228 .price-date {
224 // width: 100%; 229 // width: 100%;
@@ -253,8 +258,7 @@ $basicBtnC:#eb0313; @@ -253,8 +258,7 @@ $basicBtnC:#eb0313;
253 line-height: pxToRem(88px); 258 line-height: pxToRem(88px);
254 } 259 }
255 } 260 }
256 - .goodsName,  
257 - .goodsSubtitle { 261 + .goodsName {
258 // width: 100%; 262 // width: 100%;
259 display: table; 263 display: table;
260 span { 264 span {
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="brand-page yoho-page"> 2 <div class="brand-page yoho-page">
  3 + {{# channel}}
  4 +
3 <div class="newbrand-search"> 5 <div class="newbrand-search">
4 - <div class="search-box clearfix"> 6 + <div class="search-box clearfix">
5 <a href="{{searchUrl}}" > 7 <a href="{{searchUrl}}" >
6 <input type="text" class="search-input" placeholder="查找品牌" readonly="true"> 8 <input type="text" class="search-input" placeholder="查找品牌" readonly="true">
7 <i class="search-icon iconfont">&#xe60f;</i> 9 <i class="search-icon iconfont">&#xe60f;</i>
@@ -40,4 +42,6 @@ @@ -40,4 +42,6 @@
40 {{/ list}} 42 {{/ list}}
41 </div> 43 </div>
42 {{/ brandList}} 44 {{/ brandList}}
  45 +
  46 + {{/channel}}
43 {{> layout/footer}} 47 {{> layout/footer}}
1 <div class="hot-brands"> 1 <div class="hot-brands">
2 - {{> home/floor_header}} 2 + {{^ brandPage}}
  3 + {{> home/floor_header}}
  4 + {{/ brandPage}}
3 <div class="brands-swiper"> 5 <div class="brands-swiper">
4 <ul class="brands-list swiper-wrapper clearfix"> 6 <ul class="brands-list swiper-wrapper clearfix">
5 {{# list}} 7 {{# list}}
@@ -12,4 +14,4 @@ @@ -12,4 +14,4 @@
12 {{/ list}} 14 {{/ list}}
13 </ul> 15 </ul>
14 </div> 16 </div>
15 -</div>  
  17 +</div>
@@ -785,7 +785,7 @@ class HomeController extends AbstractAction @@ -785,7 +785,7 @@ class HomeController extends AbstractAction
785 if (empty($orderCode)) { 785 if (empty($orderCode)) {
786 $this->error(); 786 $this->error();
787 } 787 }
788 - 788 +
789 $this->_view->display('pay', array( 789 $this->_view->display('pay', array(
790 'payCenterPage' => true, 790 'payCenterPage' => true,
791 'payAppInfo' => array( 791 'payAppInfo' => array(
@@ -807,7 +807,7 @@ class HomeController extends AbstractAction @@ -807,7 +807,7 @@ class HomeController extends AbstractAction
807 ), 807 ),
808 ), 808 ),
809 'orderCode' => $orderCode, 809 'orderCode' => $orderCode,
810 - 'hasWxShare' => strpos($this->_request->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false 810 + 'hasWxShare' => strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false
811 )); 811 ));
812 } 812 }
813 813
@@ -43,6 +43,7 @@ class ClassModel @@ -43,6 +43,7 @@ class ClassModel
43 break; 43 break;
44 } 44 }
45 45
  46 + $genderArr = array('boy' => '1,3', 'girl' => '2,3', 'kids' => '1,2,3', 'lifestyle' => '1,2,3');
46 $oneClass = array(); 47 $oneClass = array();
47 $item = array(); 48 $item = array();
48 foreach ($data['data'] as $k => $v) { 49 foreach ($data['data'] as $k => $v) {
@@ -59,7 +60,8 @@ class ClassModel @@ -59,7 +60,8 @@ class ClassModel
59 'id' => $item['id'], 60 'id' => $item['id'],
60 'url' => Helpers::url('/', array( 61 'url' => Helpers::url('/', array(
61 'sort' => $item['id'], 62 'sort' => $item['id'],
62 - 'sort_name' => $item['name']), 'list') 63 + 'sort_name' => $item['name'],
  64 + 'gender' => $genderArr[$k]), 'list')
63 ); 65 );
64 66
65 $subitem = array(); 67 $subitem = array();
@@ -69,7 +71,8 @@ class ClassModel @@ -69,7 +71,8 @@ class ClassModel
69 $subitem['id'] = $value['relation_parameter']['sort']; 71 $subitem['id'] = $value['relation_parameter']['sort'];
70 $subitem['url'] = Helpers::url('/', array( 72 $subitem['url'] = Helpers::url('/', array(
71 'sort' => $value['relation_parameter']['sort'], 73 'sort' => $value['relation_parameter']['sort'],
72 - 'sort_name' => $value['category_name'] 74 + 'sort_name' => $value['category_name'],
  75 + 'gender' => $genderArr[$k]
73 ), 'list'); 76 ), 'list');
74 $item['sub'][] = $subitem; 77 $item['sub'][] = $subitem;
75 } 78 }
@@ -179,6 +179,9 @@ class IndexModel @@ -179,6 +179,9 @@ class IndexModel
179 } 179 }
180 } 180 }
181 181
  182 + // 分页需要参数
  183 + $data['guang']['gender'] = $gender;
  184 +
182 // 显示底部 185 // 显示底部
183 $data['pageFooter'] = true; 186 $data['pageFooter'] = true;
184 187
@@ -102,7 +102,7 @@ class DetailModel @@ -102,7 +102,7 @@ class DetailModel
102 if (isset($baseInfo['promotionBoList'])) { 102 if (isset($baseInfo['promotionBoList'])) {
103 $build = array(); 103 $build = array();
104 foreach ($baseInfo['promotionBoList'] as $value) { 104 foreach ($baseInfo['promotionBoList'] as $value) {
105 - $build['text'] = $value['promotionTitle']; 105 + $build['text'] = '【' . $value['promotionType'] . '】' . $value['promotionTitle'];
106 $result['goodsDiscount']['list'][] = $build; 106 $result['goodsDiscount']['list'][] = $build;
107 } 107 }
108 } 108 }
@@ -165,26 +165,31 @@ class DetailModel @@ -165,26 +165,31 @@ class DetailModel
165 foreach ($baseInfo['goodsList'] as $value) { 165 foreach ($baseInfo['goodsList'] as $value) {
166 $colorId = intval($value['colorId']); 166 $colorId = intval($value['colorId']);
167 // 商品按颜色进行分类分组 167 // 商品按颜色进行分类分组
168 - foreach ($value['goodsImagesList'] as $goods) {  
169 - $goodsList[$goods['goodsId']] = $colorId;  
170 - $goodsGroup[$colorId][] = array(  
171 - 'goodsId' => $goods['goodsId'],  
172 - 'img' => $goods['imageUrl'],  
173 - );  
174 - $colorGroup[$colorId] = array(  
175 - 'colorId' => $colorId,  
176 - 'colorName' => $value['colorName'],  
177 - 'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),  
178 - );  
179 - } 168 + if (isset($value['goodsImagesList'])) {
  169 + foreach ($value['goodsImagesList'] as $goods) {
  170 + $goodsList[$goods['goodsId']] = $colorId;
  171 + $goodsGroup[$colorId][] = array(
  172 + 'goodsId' => $goods['goodsId'],
  173 + 'img' => $goods['imageUrl'],
  174 + );
  175 + $colorGroup[$colorId] = array(
  176 + 'colorId' => $colorId,
  177 + 'colorName' => $value['colorName'],
  178 + 'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
  179 + );
  180 + }
  181 + }
  182 +
180 // 商品的尺码列表 183 // 商品的尺码列表
181 - foreach ($value['goodsSizeBoList'] as $size) {  
182 - $sizeGroup[$colorId] = array(  
183 - 'sizeName' => $size['sizeName'],  
184 - 'sizeSku' => $size['goodsSizeSkuId'],  
185 - 'sizeStorage' => $size['goodsSizeStorageNum'],  
186 - );  
187 - } 184 + if (isset($value['goodsSizeBoList'])) {
  185 + foreach ($value['goodsSizeBoList'] as $size) {
  186 + $sizeGroup[$colorId] = array(
  187 + 'sizeName' => $size['sizeName'],
  188 + 'sizeSku' => $size['goodsSizeSkuId'],
  189 + 'sizeStorage' => $size['goodsSizeStorageNum'],
  190 + );
  191 + }
  192 + }
188 } 193 }
189 194
190 // 商品图 195 // 商品图
@@ -230,6 +230,7 @@ class NewsaleModel @@ -230,6 +230,7 @@ class NewsaleModel
230 * 筛选出来的热销排行榜商品数据处理 230 * 筛选出来的热销排行榜商品数据处理
231 * 231 *
232 * @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部 232 * @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
  233 + * $param integer $channel 1表示男,2表示女,3表示潮童,4表示创意生活
233 * @param string|null $sort 品类ID查询参数 234 * @param string|null $sort 品类ID查询参数
234 * @param integer|null $tab_id Tab的ID 235 * @param integer|null $tab_id Tab的ID
235 * @param boolean $notab 时候返回顶部tab的数据,默认返回 236 * @param boolean $notab 时候返回顶部tab的数据,默认返回
@@ -237,11 +238,11 @@ class NewsaleModel @@ -237,11 +238,11 @@ class NewsaleModel
237 * @param integer $page 分页第几页 238 * @param integer $page 分页第几页
238 * @return array 处理之后的数据 239 * @return array 处理之后的数据
239 */ 240 */
240 - public static function selectTopData($gender, $sort, $tab_id, $notab, $limit, $page) 241 + public static function selectTopData($gender, $channel, $sort, $tab_id, $notab, $limit, $page)
241 { 242 {
242 $result = array(); 243 $result = array();
243 244
244 - $data = NewsaleData::getTopProducts($gender, $sort, $tab_id, $limit, $page); 245 + $data = NewsaleData::getTopProducts($gender, $channel, $sort, $tab_id, $limit, $page);
245 246
246 if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['product_list'])) { 247 if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['product_list'])) {
247 $result = NewSaleProcess::topData($data['data'], $notab, $limit, $page); 248 $result = NewSaleProcess::topData($data['data'], $notab, $limit, $page);
@@ -11,7 +11,7 @@ class BrandController extends AbstractAction @@ -11,7 +11,7 @@ class BrandController extends AbstractAction
11 11
12 /** 12 /**
13 * 品牌一览 13 * 品牌一览
14 - * 14 + *
15 * @param string gender 老版本中使用的参数, 做兼容判断 15 * @param string gender 老版本中使用的参数, 做兼容判断
16 * @param int channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道 16 * @param int channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
17 */ 17 */
@@ -41,12 +41,15 @@ class BrandController extends AbstractAction @@ -41,12 +41,15 @@ class BrandController extends AbstractAction
41 } 41 }
42 42
43 // 渲染模板 43 // 渲染模板
44 - $this->_view->display('index', Category\BrandModel::getBrandByChannel($channel)); 44 + $this->_view->display('index', array(
  45 + 'brandPage' => true,
  46 + 'channel' => Category\BrandModel::getBrandByChannel($channel)
  47 + ));
45 } 48 }
46 49
47 /** 50 /**
48 * 品牌一览搜索页 51 * 品牌一览搜索页
49 - * 52 + *
50 * @param string gender 老版本中使用的参数, 做兼容判断 53 * @param string gender 老版本中使用的参数, 做兼容判断
51 * @param int channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道 54 * @param int channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
52 */ 55 */
@@ -110,7 +110,8 @@ class NewsaleController extends AbstractAction @@ -110,7 +110,8 @@ class NewsaleController extends AbstractAction
110 110
111 // 获取性别 111 // 获取性别
112 $gender = Helpers::getGenderByCookie(); 112 $gender = Helpers::getGenderByCookie();
113 - $result = \Product\NewsaleModel::selectTopData($gender, $sort, $tab_id, $notab, $limit, $page); 113 + $channel = Helpers::getChannelByCookie();
  114 + $result = \Product\NewsaleModel::selectTopData($gender, $channel, $sort, $tab_id, $notab, $limit, $page);
114 } 115 }
115 if (empty($result)) { 116 if (empty($result)) {
116 echo ' '; 117 echo ' ';