';
if (window.innerWidth < 1024) {
htmlstr += '
';
}else {
htmlstr += '
';
}
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;j'+KeyWord[j]+'';
}
}else{
if(KeyWord.length>2){
num_video = 3;
}else{
num_video = KeyWord.length;
}
for(var j=0;j'+KeyWord[j]+'';
}
}
htmlstr+='';
}
$(".erjicar19295_ind02 .con ul").append(htmlstr);
//截字处理
wrapText();
$(".erjicar19295_ind02 .more").show();
Echo.init({
offset: 0, //离可视区域多少像素的图片可以被加载
throttle:10 //图片延时多少毫秒加载
});
//分享
$(".erjicar19295_ind02 ul li .text_con .bottom").each(function(i){
$(this).find(".share a").unbind().click(function(){
var href=$(".erjicar19295_ind02 ul li").eq(i).find(".image a").attr("href");
var title=$(".erjicar19295_ind02 ul li").eq(i).find(".text_con .title a").text();
var shaimg=$(".erjicar19295_ind02 ul li").eq(i).find(".image img").attr("src");
var shabrief=$(".erjicar19295_ind02 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")){
if($(this).parents(".share").find(".ind04cntvshare_weixin").length>0){
$(".erjicar19295_ind02 .con ul li .bottom .share a.weixin").removeClass('cur');
$(".ind04cntvshare_weixin").remove();
}else{
$(this).parents(".share").find(".weixin").addClass('cur');
$(".erjicar19295_ind02 ul li").eq(i).css("z-index","999").siblings().css("z-index","1")
requireQrcode1(i,href);
}
}
})
})
if(total<=(curPage*pageSize)){
$('.erjicar19295_ind02 .more p').text('已无更多内容').css({"background": "transparent"});
$(".erjicar19295_ind02 .more i").hide();
jiazaizhong = false;
}else{
jiazaizhong = true;
}
}
},
error:function(){}
});
}
//截字处理
$(document).ready(function () {
wrapText();
});
function wrapText() {
$("p").each(function (i) {
var $a = $(".xianzi_02 h3").eq(i);
while ($a.outerHeight() > 48) {
$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_ind02 .more i").hide();
//console.log(111);
$(".erjicar19295_ind02 .more p").html("已无更多内容");
$(".erjicar19295_ind02 .more").addClass("nomore");
first1=false;
}
}
}
}
}
// pullGetMore();
// addPullLoaderEvent();
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.clientHeight