Authored by xuqi

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

... ... @@ -11,6 +11,10 @@ var $ = require('yoho.zepto'),
var swiper,
$brandList = $('.brand-list');
var searchH = $('.newbrand-search').height(),
headerH = $('.yoho-header').height(),
brandSwipe = parseInt(searchH) + parseInt(headerH);
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
loop: true,
... ... @@ -27,14 +31,9 @@ $('.banner-top').css('padding-top', '90px');
if ($brandList.length > 0) {
$(window).scroll(function() {
var scrTop = $(window).scrollTop(),
searchH = $('.newbrand-search').height(),
headerH = $('.yoho-header').height(),
brandSwipe = parseInt(searchH) + parseInt(headerH);
var scrTop = $(window).scrollTop();
$('.brand-list').each(function() {
var offTop = $(this).offset().top - brandSwipe;
if (scrTop >= offTop) {
$brandList.find('.title-bar').css('position', 'static');
$(this).find('.title-bar').css({
... ... @@ -47,3 +46,11 @@ if ($brandList.length > 0) {
});
});
}
$('#right-bar .con').find('b').unbind().on('tap',function(){
var index=$(this).index();
if($('.bar-'+index).size()>0){
document.body.scrollTop = parseInt($('.bar-'+index)[0].offsetTop) - parseInt(brandSwipe-1);
}
});
... ...
.good-info {
display: inline-block;
width: 276rem / $pxConvertRem;
float: left;
width: 44%;
height: 486rem / $pxConvertRem;
margin: 28rem / $pxConvertRem (15rem / $pxConvertRem) 0;
margin: 28rem / $pxConvertRem 3% 0;
.tag-container {
... ...
... ... @@ -111,17 +111,18 @@
.right-bar {
width: 60rem / $pxConvertRem;
top: 240rem / $pxConvertRem !important;
overflow: hidden;
height: 75%;
top: 20%;
overflow: auto;
position: fixed;
right: 2rem / $pxConvertRem;
border-radius: 12rem / $pxConvertRem;
background: rgba(0,0,0,.8);
z-index: 2;
b {
height: 32rem / $pxConvertRem;
height: 36rem / $pxConvertRem;
line-height: 28rem / $pxConvertRem;
line-height: 36rem / $pxConvertRem;
text-align: center;
display: block;
color: #999999;
... ...
... ... @@ -83,7 +83,6 @@
.goods-container {
position: relative;
min-height: 440px;
text-align: center;
}
}
... ...
... ... @@ -32,7 +32,7 @@
{{/ hotBrand}}
{{# brandList}}
<div class="brand-list">
<div class="brand-list bar-{{@index}}">
<div class="title-bar">
<h2 style="position: static;">{{title}}</h2>
</div>
... ...