|
|
|
@ -10,8 +10,10 @@ Page({ |
|
|
|
list:[], |
|
|
|
page:1, |
|
|
|
total:1, |
|
|
|
// navList: [{title: '精彩2022', year: 2022}, {title: '回顾2021', year: 2021}],
|
|
|
|
navIndex: 0 |
|
|
|
navList: [{title: '精彩2023', year: 2023}, {title: '往期回顾', year: 2022}], |
|
|
|
navIndex: 0, |
|
|
|
sNavIndex:0, |
|
|
|
sNavList:[{title: '回顾2022', year: 2022}, {title: '回顾2021', year: 2021}] |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
@ -28,12 +30,20 @@ Page({ |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
changeSNav(e){ |
|
|
|
this.setData({ |
|
|
|
page:0, |
|
|
|
list:[], |
|
|
|
sNavIndex:e.currentTarget.dataset.index |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
getList:function(){ |
|
|
|
if(this.data.list.length>=this.data.total) return; |
|
|
|
https._post("review/getList",{ |
|
|
|
limit:10, |
|
|
|
page:this.data.page, |
|
|
|
year:'' |
|
|
|
year:this.data.sNavIndex===0?this.data.navList[this.data.navIndex].year:this.data.sNavList[this.data.sNavIndex].year |
|
|
|
}).then(res=>{ |
|
|
|
this.setData({ |
|
|
|
total:res.data.total, |
|
|
|
|