Authored by 梁志锋

merge beta/wap分支

... ... @@ -236,6 +236,8 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) {
//点击蒙版消失
hide();
return false;
});
$yohoPage.on('touchstart', '.color-list .block', function() {
... ... @@ -410,7 +412,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return;
}
//TODO status change
if ($('#chose-btn-sure').html() === '已售罄') {
return;
}
... ...
... ... @@ -29,16 +29,8 @@ $('.nav-btn').on('touchstart', function(event) {
$mobileWrap.addClass('menu-open');
$overlay.show().css('opacity', 0.3);
$sideNav.addClass('on');
event.preventDefault();
event.stopPropagation();
openSideNav = true;
//设置boy高宽,页面不能上下滑动
$('body').css({
height: $(window).height(),
overflow: 'hidden'
});
setTimeout(function() {
$sideNav.css('pointer-events', 'auto');
}, 400);
... ... @@ -50,13 +42,9 @@ function hideSideBar() {
openSideNav = false;
if ($mobileWrap.hasClass('menu-open')) {
$mobileWrap.removeClass('menu-open');
$('.overlay').hide();
$overlay.hide();
$('.sub-nav').removeClass('show');
$sideNav.removeClass('on');
$('body').css({
height: 'auto',
overflow: 'auto'
});
}
}
... ... @@ -65,6 +53,10 @@ $('.overlay').on('touchstart', function(e) {
return false;
});
$sideNav.on('touchmove', function(e) {
return false;
});
//点击一级导航,弹出二级导航
$sideNav.on('touchstart', 'li', function(e) {
if ($(this).find('.sub-nav').size() > 0) {
... ... @@ -80,9 +72,13 @@ $sideNav.on('touchstart', 'li', function(e) {
//返回一级导航,收起二级导航
$subNav.each(function() {
$(this).find('li').eq(0).on('touchstart', function() {
$(this).find('li').eq(0).on('touchend', function() {
$sideNav.css('pointer-events', 'none');
setTimeout(function() {
$sideNav.css('pointer-events', 'auto');
}, 400);
$('.sub-nav').removeClass('show');
return false;
});
}).on('touchstart', function(e) {
if (e.currentTarget !== e.target) {
... ... @@ -93,6 +89,7 @@ $subNav.each(function() {
// 侧边栏点击背景色变化
function highlight($elem) {
$elem.find('li').on('touchstart', function() {
$elem.find('.highlight').removeClass('highlight');
$(this).addClass('highlight');
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
... ...
... ... @@ -32,4 +32,3 @@ $(window).scrollTop(1).scrollTop(0);
... ...
... ... @@ -14,7 +14,7 @@
@include transition(all .3s);
> ul {
margin-bottom: 20rem / $pxConvertRem;
margin-bottom: 16rem / $pxConvertRem;
background: #fff;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
... ... @@ -22,8 +22,8 @@
li {
position: relative;
height: 80rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
height: 64rem / $pxConvertRem;
line-height: 64rem / $pxConvertRem;
background: #fff;
&:after {
... ... @@ -45,21 +45,27 @@
a {
display: block;
height: 100%;
padding-left: 110rem / $pxConvertRem;
padding-left: 92rem / $pxConvertRem;
color: #444;
}
em {
font-weight: bold;
font-size: 26rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
}
.title {
display: inline-block;
font-size: 36rem / $pxConvertRem;
vertical-align: bottom;
padding-left: 20rem / $pxConvertRem;
// 此处字体小于 12px, 先扩大,再scale缩小
@include transform(scale(0.5));
-webkit-transform-origin: 0 50% 0;
-moz-transform-origin: 0 50% 0;
-ms-transform-origin: 0 50% 0;
transform-origin: 0 50% 0;
}
.nav-icon, .nav-img {
... ... @@ -92,8 +98,8 @@
.first {
li {
height: 100rem / $pxConvertRem;
line-height: 100rem / $pxConvertRem;
height: 80rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
&:last-child {
... ... @@ -105,7 +111,7 @@
}
em {
font-size: 36rem / $pxConvertRem;
font-size: 32rem / $pxConvertRem;
}
.nav-img, .nav-icon {
... ...
... ... @@ -130,6 +130,7 @@
z-index: 2;
position: relative;
&.boys {
@include background-image(linear-gradient(#323232, #414141));
}
... ... @@ -160,9 +161,9 @@
i{
width: 100%;
height: 40%;
overflow: hidden;
display: block;
color: #fff;
margin-bottom: 8rem / $pxConvertRem;
}
span{
width: 100%;
... ...