|
@@ -0,0 +1,62 @@
|
|
|
+<div class="pc-index-bottom">
|
|
|
+ <img class="bottom-member-ad" adv_name="PC首页广告位-底部" src="" alt="底部广告位">
|
|
|
+</div>
|
|
|
+
|
|
|
+<script>
|
|
|
+ $(function () {
|
|
|
+ // 首页底部广告位
|
|
|
+ {{$bottom:=(Ad "jy_pc_index_bottom" -1 .Host)}}
|
|
|
+ var bottom_img = ({{$bottom}})
|
|
|
+
|
|
|
+ // 首页底部样式调整,适配广告位
|
|
|
+ function fixBottomADHeight (type) {
|
|
|
+ var adHeight = $('.pc-index-bottom').height()
|
|
|
+ if (type) {
|
|
|
+ $(".jy_renzheng").css('padding-bottom', adHeight)
|
|
|
+ $(".j-bottom").attr('data-padding-bottom', Number($(".j-bottom").css('padding-bottom').replace('px', '')))
|
|
|
+ $(".j-bottom").css('padding-bottom', Number($(".j-bottom").css('padding-bottom').replace('px', '')) + adHeight)
|
|
|
+ } else {
|
|
|
+ $(".jy_renzheng").css('padding-bottom', 0)
|
|
|
+ $(".j-bottom").css('padding-bottom', Number($(".j-bottom").attr('data-padding-bottom')))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $('.pc-index-bottom .bottom-member-ad').on('load', function () {
|
|
|
+ fixBottomADHeight(true)
|
|
|
+ })
|
|
|
+ $('.pc-index-bottom .bottom-member-ad').attr('src', bottom_img[0].s_pic)
|
|
|
+ $('.pc-index-bottom .bottom-member-ad').unbind('click').click(function () {
|
|
|
+ window.open(bottom_img[0].s_link)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ clearInterval(memberTimer)
|
|
|
+ var memberTimer = setInterval(function () {
|
|
|
+ if (window.memberStatus >= 0) {
|
|
|
+ clearInterval(memberTimer)
|
|
|
+ }
|
|
|
+ adBottomFn()
|
|
|
+ }, 2000)
|
|
|
+ function adBottomFn () {
|
|
|
+ if (window.memberStatus > 0) {
|
|
|
+ $('.pc-index-bottom').hide()
|
|
|
+ fixBottomADHeight(false)
|
|
|
+ } else {
|
|
|
+ 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;
|
|
|
+ $('.pc-index-bottom').fadeOut()
|
|
|
+ })
|
|
|
+ function isScrollEnd() {
|
|
|
+ top2 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ if(top1 == top2 && (window.memberStatus <= 0 || !window.memberStatus)){
|
|
|
+ $('.pc-index-bottom').fadeIn()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+</script>
|