Authored by whb

修改h5

... ... @@ -13,6 +13,7 @@
<body>
<div class="mobile-wrap">
<div class="hd">
<div class="header-download-wrap">
<div class="header-download clearfix">
<div class="tip-pic"></div>
<div class="tip-info">
... ... @@ -22,6 +23,7 @@
</div>
<span class="tip-close"></span>
</div>
</div>
<h1 class="logo iconfont"><a class="back-btn iconfont" href="javascript:;">&#xe60f;</a>&#xe60b;</h1>
</div>
<div class="bd">
... ... @@ -115,7 +117,7 @@
<script type="text/javascript" src="../../../res/js/lib/seajs.js"></script>
<script type="text/javascript">
seajs.use(['zepto', 'mobile'],function($, mobile){
//mobile.common();
mobile.common();
mobile.brand();
})
</script>
... ...
... ... @@ -19,16 +19,21 @@ define('mobile', function(require, exports) {
if ($('.header-download').size() > 0) {
downloadH = $('.header-download').height();
//顶部app下载位置
console.log(!$('.search-wrap input').hasClass('show'));
$(window).on('scroll', function() {
scrollTop = $(window).scrollTop();
if (scrollTop >= downloadH) {
$('.header-download').addClass('fix');
$('.header-download-wrap').addClass('show');
} else {
$('.header-download').removeClass('fix');
$('.header-download-wrap').removeClass('show');
if (!$('.search-wrap input').hasClass('show')) {
if (scrollTop >= downloadH) {
$('.header-download').addClass('fix');
$('.header-download-wrap').addClass('show');
} else {
$('.header-download').removeClass('fix');
$('.header-download-wrap').removeClass('show');
}
}
});
}
};
... ... @@ -107,9 +112,8 @@ define('mobile', function(require, exports) {
$('.search-wrap input').on('focus', function() {
var offsetTop = $('.search-wrap').offset().top;
$('.overlay').addClass('show');
if ($('.header-download').hasClass('fix')) {
offsetTop = $('.header-download').outerHeight();
}
$(this).removeClass('show').addClass('show');
$('body,html').animate({
scrollTop: offsetTop
});
... ...
... ... @@ -27,7 +27,7 @@
<div class="layout-item clearfix">
<div class="image-box">
<img data-original="<?php echo Lib_Images::getImageUrl($plan['pic'], 'source','fragmentimg');?>?imageView/2/w/360"
src="<?php echo Lib_Images::getImageUrl($plan['pic'], 'source','fragmentimg');?>?imageView/2/w/320" alt="" >
src="<?php echo Lib_Images::getImageUrl($plan['pic'], 'source','fragmentimg');?>" alt="" >
</div>
<div class="content">
<h2 class="volupia">
... ...