|
@@ -92,7 +92,7 @@
|
|
|
</section>
|
|
|
</section>
|
|
|
{{range $k,$v:=Ad "jy-pc-dataInterface-bottom" -1 .Host}}
|
|
|
- <div class="data-market-ad-bottom">
|
|
|
+ <div class="data-market-ad-bottom" onClick="isAdJump({{ $v }})">
|
|
|
<img src="{{Msg "seo" "cdn"}}{{$v.S_pic}}" alt="">
|
|
|
</div>
|
|
|
{{end}}
|
|
@@ -160,23 +160,30 @@
|
|
|
});
|
|
|
};
|
|
|
function windowScrollFn () {
|
|
|
- // 底部横幅固定
|
|
|
- var stickyFooter = $('.data-market-ad-bottom');
|
|
|
- // 吸底
|
|
|
- // 如果距离底部
|
|
|
- var bottomFooter = $('.j-bottom');
|
|
|
- var ob = { top: 0 };
|
|
|
- if (bottomFooter.length) {
|
|
|
- ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect();
|
|
|
- }
|
|
|
- // bottom出现在视口
|
|
|
- var bottom = window.innerHeight - ob.top;
|
|
|
- if (bottom > 0 && ob.top !== 0) {
|
|
|
- stickyFooter.css({ bottom: parseInt(bottom) });
|
|
|
- } else {
|
|
|
- stickyFooter.css({ bottom: 0 });
|
|
|
+ var top1 = 0;
|
|
|
+ var top2 = 0;
|
|
|
+ var timer = null; // 定时器
|
|
|
+ $(document).scroll(function(){
|
|
|
+ clearTimeout(timer)
|
|
|
+ timer = setTimeout(isScrollEnd, 1000);
|
|
|
+ top1 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ // console.log("滚动中")
|
|
|
+ $('.data-market-ad-bottom').fadeOut()
|
|
|
+ })
|
|
|
+ function isScrollEnd() {
|
|
|
+ top2 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ if(top1 == top2 && (window.memberStatus <= 0 || !window.memberStatus)){
|
|
|
+ // console.log('滚动结束了')
|
|
|
+ $('.data-market-ad-bottom').fadeIn()
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
+ // 广告位跳转链接
|
|
|
+ function isAdJump(item){
|
|
|
+ if(item.s_link){
|
|
|
+ window.open(item.s_link)
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|