var num = 8;//每个子数组里的元素个数
var arr = [];
for(var i=0;i<data.list.length;i++){
var appanliHtml = '<div style="height:240px;">'+
'<a href="applistinfo.php.html?id=198" target="_blank">'+
'<img src="'+imgUrl+''+data.list[i].photo+'"/>'+
'<span>'+
'<i>'+data.list[i].title+'</i>'+
'</span>'+
'</a>'+
'</div>'
arr.push(appanliHtml);
$('.add_appAnli').append(appanliHtml);
}
var Arr = new Array(Math.ceil(arr.length/num));
if(appLength>8){
$(".picange").show();
for(var i = 0; i<Arr.length-1;i++){
Arr[i] = new Array();
for(var j = 0; j<num; j++){
Arr[i][j] = "";
}
var ispage = (Arr.length-1)*8;
var lastPage = appLength-ispage;
for(var isnum=0;isnum<lastPage;isnum++){
Arr[Arr.length-1] = new Array();
Arr[Arr.length-1][isnum]= "";
}
}
}else{
$(".picange").hide();
for(var i = 0; i<Arr.length;i++){
Arr[i] = new Array();
for(var j = 0; j<num; j++){
Arr[i][j] = "";
}
}
}
for(var i = 0; i<arr.length;i++){
Arr[parseInt(i/num)][i%num] = arr[i];
}
for( var i=0;i<Arr.length;i++ ){
var appanliHtml = '<li class="add_appAnli">'+Arr[i].join("")+'</li>';
$('.add_appAnliWrap').append(appanliHtml);
}