Authored by whb

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

@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 <body> 13 <body>
14 <div class="mobile-wrap"> 14 <div class="mobile-wrap">
15 <div class="hd"> 15 <div class="hd">
  16 + <div class="header-download-wrap">
16 <div class="header-download clearfix"> 17 <div class="header-download clearfix">
17 <div class="tip-pic"></div> 18 <div class="tip-pic"></div>
18 <div class="tip-info"> 19 <div class="tip-info">
@@ -22,6 +23,7 @@ @@ -22,6 +23,7 @@
22 </div> 23 </div>
23 <span class="tip-close"></span> 24 <span class="tip-close"></span>
24 </div> 25 </div>
  26 + </div>
25 <h1 class="logo iconfont"><a class="back-btn iconfont" href="javascript:;">&#xe60f;</a>&#xe60b;</h1> 27 <h1 class="logo iconfont"><a class="back-btn iconfont" href="javascript:;">&#xe60f;</a>&#xe60b;</h1>
26 </div> 28 </div>
27 <div class="bd"> 29 <div class="bd">
@@ -115,7 +117,7 @@ @@ -115,7 +117,7 @@
115 <script type="text/javascript" src="../../../res/js/lib/seajs.js"></script> 117 <script type="text/javascript" src="../../../res/js/lib/seajs.js"></script>
116 <script type="text/javascript"> 118 <script type="text/javascript">
117 seajs.use(['zepto', 'mobile'],function($, mobile){ 119 seajs.use(['zepto', 'mobile'],function($, mobile){
118 - //mobile.common(); 120 + mobile.common();
119 mobile.brand(); 121 mobile.brand();
120 }) 122 })
121 </script> 123 </script>
@@ -19,16 +19,21 @@ define('mobile', function(require, exports) { @@ -19,16 +19,21 @@ define('mobile', function(require, exports) {
19 if ($('.header-download').size() > 0) { 19 if ($('.header-download').size() > 0) {
20 downloadH = $('.header-download').height(); 20 downloadH = $('.header-download').height();
21 //顶部app下载位置 21 //顶部app下载位置
  22 + console.log(!$('.search-wrap input').hasClass('show'));
  23 +
22 $(window).on('scroll', function() { 24 $(window).on('scroll', function() {
23 scrollTop = $(window).scrollTop(); 25 scrollTop = $(window).scrollTop();
24 - if (scrollTop >= downloadH) {  
25 - $('.header-download').addClass('fix');  
26 - $('.header-download-wrap').addClass('show');  
27 - } else {  
28 - $('.header-download').removeClass('fix');  
29 - $('.header-download-wrap').removeClass('show'); 26 + if (!$('.search-wrap input').hasClass('show')) {
  27 + if (scrollTop >= downloadH) {
  28 + $('.header-download').addClass('fix');
  29 + $('.header-download-wrap').addClass('show');
  30 + } else {
  31 + $('.header-download').removeClass('fix');
  32 + $('.header-download-wrap').removeClass('show');
  33 + }
30 } 34 }
31 }); 35 });
  36 +
32 } 37 }
33 38
34 }; 39 };
@@ -107,12 +112,13 @@ define('mobile', function(require, exports) { @@ -107,12 +112,13 @@ define('mobile', function(require, exports) {
107 $('.search-wrap input').on('focus', function() { 112 $('.search-wrap input').on('focus', function() {
108 var offsetTop = $('.search-wrap').offset().top; 113 var offsetTop = $('.search-wrap').offset().top;
109 $('.overlay').addClass('show'); 114 $('.overlay').addClass('show');
110 - if ($('.header-download').hasClass('fix')) {  
111 - offsetTop = $('.header-download').outerHeight();  
112 - } 115 + $(this).removeClass('show').addClass('show');
  116 +
113 $('body,html').animate({ 117 $('body,html').animate({
114 scrollTop: offsetTop 118 scrollTop: offsetTop
115 }); 119 });
  120 +
  121 +
116 }); 122 });
117 $('.search-wrap').find('input').on('keyup', function(event) { 123 $('.search-wrap').find('input').on('keyup', function(event) {
118 var keycode = event.which; 124 var keycode = event.which;