function?pageList(orderType,currentPage){
????$.ajax( url:'游記列表',? data:{orderType,currentPage},
????????success:res=>{ var?arr=res.data.content;? ?var?str='';
????????????arr.forEach(fun(e)?{? str+=`一個tn-item`? });
????????????$('.tn-list').html(str);? }
????})
}? pageList(2,1)
//點擊第二頁
$('#pagination?a:nth-child(3)').on('cli',fun(){
????if($('._j_gs_tab?active').hasClass('tn-nav-hot'))? { pageList(2,2) } else { pageList(1,2)? }
})
//點擊第一頁:? child(2),(2,1)? ?,? (1,1)
//?切換頂部tab
$('._j_gs_tab').on('cli',fun(){
????if($(this).hasClass('tn-nav-new'))? { pageList(1,1)}? else? {pageList(2,1) }
????//?添加tab樣式
????$(this).add('active').sib().remo('active')
})