Authored by zhangxiaoru

弹窗禁止滑动

... ... @@ -71,6 +71,6 @@
{{/ townContent}}
</div>
</div>
<div class="dia-c"></div>
<div class="dia-c popover"></div>
{{/ familyIndexData}}
</div>
... ...
<div class="down-load-detail hide">
<div class="down-load-detail hide popover">
<div class="down-close"></div>
<div class="back"></div>
<div class="detail-content">
... ...
... ... @@ -34,7 +34,8 @@ class FamilyIndex extends Page {
$bannerCenterSwiper: $('.banner-center-swiper'),
$back: $('.back'),
$vipMore: $('more'),
$trendCode: $('.trend-code')
$trendCode: $('.trend-code'),
$popover: $('.popover')
};
this.view = {
... ... @@ -66,6 +67,7 @@ class FamilyIndex extends Page {
this.selector.$contentItem.on('click', this.showInfo.bind(this));
this.selector.$diaC.on('click', this.selector.$close, this.hideVipInfo.bind(this));
this.selector.$back.on('click', this.goBack.bind(this));
this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this));
}
// 头像
... ... @@ -198,6 +200,8 @@ class FamilyIndex extends Page {
this.selector.$downLoadDetail = $('.down-load-detail');
this.selector.$downClose = $('.down-close');
this.selector.$downClose.on('click', this.downClose.bind(this));
this.selector.$popover = $('.popover');
this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this));
});
}
... ... @@ -300,9 +304,16 @@ class FamilyIndex extends Page {
}
}
// 关闭下载弹窗
downClose() {
this.selector.$downLoadDetail.addClass('hide');
}
// 弹窗出现禁止滑动
banSliding(e) {
e.preventDefault();
return false;
}
}
$(() => {
... ...
... ... @@ -150,7 +150,7 @@
.code-set {
background-image: resolve("home/index/code-set.png");
background-repeat: no-repeat;
background-size: 100% 90%;
background-size: 100% 93%;
display: inline-block;
width: 40px;
height: 44px;
... ...