";
}else{
var img = "
";
}
dl = "
"+
"- "+href+img+"
"+
"- "+
"
"+href+""+data[i].title+"
"+
""+data[i].add_date+""+data[i].click+"
"+
""+data[i].content+"
"+
""+href2+detail+" >
"+
" "+
""+
"
";
}
else
{
dl = "
"+href+""+data[i].title+"
"+
"
"+data[i].add_date+""+data[i].click+"
"+
"
"+data[i].content+"
"+
"
"+href2+detail+" >
";
}
newcontent += "
"+dl+"";
}
$('.reviews_content ul').html(newcontent);
var pageTotal = Math.ceil(res.total / res.pageSize),
id = 'izuzrbqhos:%19unhc(6)',
category = 'category';
if(id != '' && category.length != 0){
category = '/category/izuzrbqhos:%19unhc(6)'
}
// var html = '';
// if(res.page == 1){
// html += '
上頁'
// }else{
// html += '
上頁'
// }
// for(var j=0;j
'+thispage+''
// }
// if(res.page == pageTotal){
// html += '下頁'
// }else{
// html += '下頁'
// }
// $('#pagination').html(html);
$('#pagination').pagination(pageTotal, {
num_edge_entries: 1, //邊緣頁數
num_display_entries: 4, //主體頁數
items_per_page: 1, //每頁顯示1項
prev_text: "上一頁",
next_text: "下一頁",
current_page: Number(res.page-1),
callback: function(p){
// console.log(p)
// console.log(this)
$('#pagination a').each(function(e){
let tp = $(this).text();
$(this).attr('href', '/index.php/reviews'+category+'?page='+tp)
})
}
});
}
},
error: function(e){
console.log(e);
}
})
}
$(document).ready(function(){
getdata();
});