10博官网app下载
"),
$.ajax({
url: '/index.php?m=Index&a=listartical',
type: 'GET',
dataType: 'json',
data: {
cid : 24,
start : getMore.start,
size : 20
},
})
.done(function(e) {
getMore.start += 20;
if (e.total>getMore.start) {
getMore.hasMore = true;
if (e.state === 'SUCCESS') {
var list = $(e.list);
list.each(function(index, el) {
$o = $('');
console.log(this.thumb == "");
if (this.thumb == "") {
$o.addClass('news-list-fix');
$o.find('.news-img').remove();
}else{
$o.find('img').attr('src', this.thumb);
};
$o.find('.title a').text(this.title);
$o.find('.summary').text(this.description);
$o.find('.date').text(this.inputtime);
$o.find('.more,.news-img a,.title a').attr('href',this.url);
switch(parseInt(this.count/10)){
case 0:count = 1;break;
case 1:count = 2;break;
default:count = 3;;
}
$o.find('.hot').removeClass('hot').addClass('hot-'+count).text(this.count);
$o.bind('mouseover',function(){
$(this).addClass("hover");
}),
$o.bind('mouseleave',function(){
$(this).removeClass("hover");
})
$('#loading').before($o);
});
}else{
console.log('else '+e.state);
};
} else{
$('#loading').html('沒有更多了
');
};
getMore.hasMore = false;
})
.fail(function() {
$('#loading').text('加載失敗');
})):1;
}
}
getMore.init();