Authored by ccbikai

侧边连优化

@@ -26,7 +26,7 @@ var requestFrame, @@ -26,7 +26,7 @@ var requestFrame,
26 $logotrans = $('.home-header .logo'), 26 $logotrans = $('.home-header .logo'),
27 isen = true; 27 isen = true;
28 28
29 -var navHammer, mobileWrapHammer; 29 +var navHammer;
30 30
31 require('./maybe-like'); 31 require('./maybe-like');
32 32
@@ -53,23 +53,18 @@ navHammer.on('tap', function(event) { @@ -53,23 +53,18 @@ navHammer.on('tap', function(event) {
53 function hideSideBar() { 53 function hideSideBar() {
54 if ($mobileWrap.hasClass('menu-open')) { 54 if ($mobileWrap.hasClass('menu-open')) {
55 $mobileWrap.removeClass('menu-open'); 55 $mobileWrap.removeClass('menu-open');
56 - $overlay.css('opacity', 0); 56 + $('.overlay').hide();
57 $('.sub-nav').removeClass('show'); 57 $('.sub-nav').removeClass('show');
58 $sideNav.removeClass('on'); 58 $sideNav.removeClass('on');
59 $('body').css({ 59 $('body').css({
60 height: 'auto', 60 height: 'auto',
61 overflow: 'auto' 61 overflow: 'auto'
62 }); 62 });
63 - setTimeout(function() {  
64 - $('.overlay').hide();  
65 - }, 300);  
66 } 63 }
67 } 64 }
68 65
69 -mobileWrapHammer = new Hammer($('.mobile-wrap')[0]);  
70 -mobileWrapHammer.on('tap', function(e) { 66 +$('.overlay').on('touchend', function(e) {
71 hideSideBar(); 67 hideSideBar();
72 - e.srcEvent.stopPropagation();  
73 return false; 68 return false;
74 }); 69 });
75 70
@@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
26 right: 0; 26 right: 0;
27 bottom: 0; 27 bottom: 0;
28 background: #000; 28 background: #000;
29 - opacity: 0;  
30 z-index: 4; 29 z-index: 4;
31 @include transition(opacity 1s); 30 @include transition(opacity 1s);
32 } 31 }
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 <div class="search-box clearfix"> 4 <div class="search-box clearfix">
5 <a href="{{searchUrl}}" > 5 <a href="{{searchUrl}}" >
6 <input type="text" class="search-input" placeholder="查找品牌" readonly="true"> 6 <input type="text" class="search-input" placeholder="查找品牌" readonly="true">
7 - <!-- <span>查找品牌</span> -->  
8 <i class="search-icon iconfont">&#xe60f;</i> 7 <i class="search-icon iconfont">&#xe60f;</i>
9 </a> 8 </a>
10 </div> 9 </div>