'; ss += '
'; ss += "
"; ss += '
扫一扫 分享到微信
'; ss += "
"; $(".erjicar19295_slider .list_con .swiper-slide").eq(index).find(".right_text .share").append(ss); var ua = "canvas"; if (navigator.userAgent.indexOf("MSIE") > -1) { ua = "table" } jQuery("#codeqr").qrcode({ render: ua, foreground: "#000", background: "#FFF", width: 102, height: 102, text: shareObj.shareUrl }); } } //移动端轮播 function iphonelunbo(){ var slidelength = $("#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide").length; $("#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide").removeClass("cur") if (slidelength > 1) { var lunbo18795_ind01 = new Swiper('#erjicar19295_slider .swiper-container', { autoplay: 3000, speed: 1000, initialSlide: 0, //默认显示第二个图片 autoplayDisableOnInteraction: false, loop: true, centeredSlides: true, slidesPerView: "auto", loopedSlides: slidelength, //li的个数 spaceBetween: 0, //watchSlidesVisibility:true, //observer:true, //observeParents:true, lazyLoading: true, lazyLoadingOnTransitionStart: true, lazyLoadingInPrevNext: true, onInit: function (swiper) { $("#erjicar19295_slider .swiper-pagination-total").text(slidelength); //console.log(slidelength,swiper); //swiper.slides[2].className="swiper-slide swiper-slide-active";//第一次打开不要动画 } }); $(window).resize(function () { setTimeout(function () { lunbo18795_ind01.onResize(); lunbo18795_ind01.stopAutoplay(); lunbo18795_ind01.startAutoplay(); }, 300); }); window.addEventListener("pageshow", function (event) { if (event.persisted || navigator.userAgent.indexOf('iPhone') > -1) { lunbo18795_ind01.onResize(); lunbo18795_ind01.stopAutoplay(); lunbo18795_ind01.startAutoplay(); } }); } else { $('#erjicar19295_slider .swiper-container').css({ "padding": "0 0.24rem" }); $('#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide').eq(0).css({ "transform": "scale(1)", "-webkit-transform": "scale(1)", "-moz-transform": "scale(1)" }); var lide_0 = $('#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide').eq(0).find(".img img").attr("data-src"); $('#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide').eq(0).find(".img img").attr("src", lide_0); $("#erjicar19295_slider .swiper-container .swiper-wrapper .text p").css("padding-right", "0.2rem"); $("#erjicar19295_slider .swiper-container .swiper-wrapper .swiper-slide .swiper-pagination").css("display", "none"); } }

正在加载...

'; htmlstr += '
'; htmlstr += '

'+data.data.list[i].title+'

'; if (window.innerWidth < 1024) { htmlstr += '

'+data.data.list[i].brief+'

'; } else { htmlstr += '

'+data.data.list[i].brief+'

'; } htmlstr += '
'; htmlstr += '' + fous_Date[0] +''; var KeyWord=data.data.list[i].keywords.split(","); var num_video = ""; if (window.innerWidth < 1024) { if(KeyWord.length>1){ num_video = 1; }else{ num_video = KeyWord.length; } for(var j=0;j2){ num_video = 3; }else{ num_video = KeyWord.length; } for(var j=0;j'+KeyWord[j]+''; } } htmlstr+='
'; } $(".erjicar19295_ind01 .con ul").append(htmlstr); //截字 wrapText(); Echo.init({ offset: 0, //离可视区域多少像素的图片可以被加载 throttle:10 //图片延时多少毫秒加载 }); $(".erjicar19295_ind01 .more").show(); //分享 $(".erjicar19295_ind01 ul li .text_con .bottom").each(function(i){ $(this).find(".share a").unbind().click(function(){ var href=$(".erjicar19295_ind01 ul li").eq(i).find(".image a").attr("href"); var title=$(".erjicar19295_ind01 ul li").eq(i).find(".text_con .title a").text(); var shaimg=$(".erjicar19295_ind01 ul li").eq(i).find(".image img").attr("src"); var shabrief=$(".erjicar19295_ind01 ul li").eq(i).find(".text_con .brief a").text(); shareObj.shareUrl = href; shareObj.shareTitle = title; shareObj.pic = shaimg; shareObj.summary = shabrief; if($(this).hasClass("weixin")){ $(".erjicar19295_ind01 .con ul li .bottom .share a.weixin").removeClass('cur'); if($(this).parents(".share").find(".ind04cntvshare_weixin").length>0){ $(".erjicar19295_ind01 .con ul li .bottom .share a.weixin").removeClass('cur'); $(".ind04cntvshare_weixin").remove(); }else{ $(this).parents(".share").find(".weixin").addClass('cur'); $(".erjicar19295_ind01 ul li").eq(i).css("z-index","999").siblings().css("z-index","1") requireQrcode1(i,href); } } }) }) if(total<=(curPage*pageSize)){ $('.erjicar19295_ind01 .more p').text('已无更多内容').css({"background": "transparent"}); $(".erjicar19295_ind01 .more i").hide(); jiazaizhong = false; }else{ jiazaizhong = true; } } }, error:function(){} }); } //截字处理 $(document).ready(function () { wrapText(); }); function wrapText() { $("p").each(function (i) { var $a = $(".xianzi p").eq(i); while ($a.outerHeight() > 52) { $a.text($a.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "...")); } }) } // 绑定:上拉加载更多监听 function addPullLoaderEvent() { if(window.addEventListener) { window.addEventListener('scroll', pullGetMore, false);//滚动条滚动执行addcomment方法 } else { window.attachEvent('onscroll', pullGetMore);//ie滚动条滚动执行addcomment方法 } } function pullGetMore(ev) { var height=getClientHeight(),// 窗口可视范围的高度 theight=getScrollTop(),//获取窗口滚动条高度 rheight=getScrollHeight(),//获取文档内容实际高度 bheight=rheight-theight-height;// 滚动条距离底部的高度 var cHeight; if(navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)){ var screenWidth = window.screen.width; var screenHeight = window.screen.height; cHeight = Math.ceil(1200*screenHeight/screenWidth); }else{ cHeight = document.documentElement.clientHeight; //可见内容区高度 } if (bheight<=cHeight){ if(jiazaizhong){ if (bheight<=cHeight){ jiazaizhong = false; setTimeout(function(){ curPage=curPage+1; showli(curPage,pageSize); //调用截字 wrapText(); },800); }else{ if(first1){ $(".erjicar19295_ind01 .more i").hide(); $(".erjicar19295_ind01 .more p").html("已无更多内容"); $(".erjicar19295_ind01 .more").addClass("nomore"); first1=false; } } } } } var isFirstInit=true; if (isFirstInit){ showli(curPage,pageSize); //添加,上拉加载更多监听 addPullLoaderEvent(); isFirstInit=false; } //获取窗口可视范围的高度 function getClientHeight(){ var clientHeight=0; if(document.body.clientHeight&&document.documentElement.clientHeight){ var clientHeight=(document.body.clientHeightdocument.documentElement.clientHeight)?document.body.clientHeight:document.documentElement.clientHeight; } return clientHeight; } //获取窗口滚动条高度 function getScrollTop(){ var scrollTop=0; if(document.documentElement&&document.documentElement.scrollTop){ scrollTop=document.documentElement.scrollTop; }else if(document.body){ scrollTop=document.body.scrollTop; } return scrollTop; } //获取文档内容实际高度 function getScrollHeight(){ return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight); } function requireQrcode1(index,url) { if ($("#codeqr1").length > 1) { $("#codeqr1").show(); } else { createTableCode1(index,url); } function createTableCode1(index,url) { $(".ind04cntvshare_weixin").remove(); var ss = '
'; ss += '
'; ss += '
'; ss += '
'; ss += "
"; ss += '
扫一扫 分享到微信
'; ss += "
"; $(".erjicar19295_ind01 .con ul li").eq(index).find(".bottom .share").append(ss); var ua = "canvas"; if (navigator.userAgent.indexOf("MSIE") > -1) { ua = "table" } jQuery("#codeqr1").qrcode({ render: ua, foreground: "#000", background: "#FFF", width: 102, height: 102, text: url }); } } /*微信收起*/ $('body').click(function(e) { var target = $(e.target); if(!target.is('#codeqr1')&&!target.is('.erjicar19295_ind01 .con ul li .bottom .share a.weixin')){ $(".erjicar19295_ind01 .con ul li .bottom .share a.weixin").removeClass('cur'); $(".ind04cntvshare_weixin").remove() } if(!target.is('#codeqr')&&!target.is('.erjicar19295_slider .list_con .swiper-slide .right_text .share a.weixin')){ $(".erjicar19295_slider .list_con .swiper-slide .right_text .share a.weixin").removeClass('cur'); $(".ind01cntvshare_weixin").remove() } });
手机访问
返回顶部