Authored by biao

更新频道选择页顶部导航

... ... @@ -183,5 +183,6 @@ if ($genderItem.length > 0) {
$genderItem.on('touchstart', function() {
$('.genderNav ul .active').removeClass('active');
$(this).addClass('active');
window.location.search = "channel=" + ($(this).data('id') + 1);
});
}
... ...
... ... @@ -189,7 +189,7 @@ window.reMarginFooter('.footer-tab');
exports.set = function(c) {
window.setCookie('_Channel', c, {
expires: 365,
domain: '.m.yohobuy.com'
domain: '.dev.yohobuy.com'
});
};
... ...
... ... @@ -21,8 +21,8 @@ module.exports = function(specificGender) {
url;
//The kidsType can be specified by the parameter. Add by @ZhaoBiao
var kidsType = specificGender === 'kidsType' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
lifestyleType = specificGender === 'lifestyleType' ||
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
lifestyleType = specificGender === 'lifestyle' ||
$('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false;
var $curNav,
... ... @@ -148,6 +148,11 @@ module.exports = function(specificGender) {
}
}
// 优惠券页面直接加载你可能喜欢。add by @zhaobiao
if (specificGender) {
search();
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
... ...
... ... @@ -4,13 +4,9 @@
* @date: 2015/12/30
*/
//var $ = require('jquery');
//
//function getGender () {
// // body...
//}
function getGender () {
return window.cookie('_Channel');
}
require('../home/maybe-like')();
require('../home/maybe-like')(getGender());
... ...
... ... @@ -2,7 +2,16 @@
<div class="brand-page yoho-page">
{{# channel}}
{{> home/top_nav}}
<div class="genderNav">
<ul>
{{# channels}}
<li {{#if active}}class="active"{{/if}} data-id="{{@index}}">
<span>{{name}}</span>
<span class="split-border"></span>
</li>
{{/channels}}
</ul>
</div>
<div class="newbrand-search re-pos-search">
<div class="search-box clearfix">
... ...
<div class="genderNav">
<ul>
<li class="active">
<span>Boy</span>
<span class="split-border"></span>
</li>
<li>
<span>Girl</span>
<span class="split-border"></span>
</li>
<li>
<span>Kid</span>
<span class="split-border"></span>
</li>
<li>
<span>Lifestyle</span>
<span class="split-border"></span>
</li>
</ul>
</div>
... ... @@ -8,7 +8,7 @@ use Plugin\Helpers;
/**
* 品牌相关的模板数据模型
*
*
* @name BrandModel
* @package Models/Category
* @copyright yoho.inc
... ... @@ -29,7 +29,7 @@ class BrandModel
/**
* 根据频道获取品牌一览数据
*
*
* @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
* @return array
*/
... ... @@ -40,20 +40,20 @@ class BrandModel
// 设置品牌一览顶部频道导航
$channels = array(
1 => array(
'name' => 'Boy'
array(
'name' => 'Boy'
),
2 => array(
'name' => 'Girl'
array(
'name' => 'Girl'
),
3 => array(
'name' => 'Kid'
array(
'name' => 'Kid'
),
4 => array(
'name' => 'Lifestyle'
array(
'name' => 'Lifestyle'
)
);
$channels[$channel]['active'] = true;
$channels[$channel-1]['active'] = true;
$result['channels'] = $channels;
/* 根据频道调用接口 */
... ... @@ -109,7 +109,7 @@ class BrandModel
/**
* 获取搜索的品牌列表
*
*
* @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
* @return array
*/
... ...