|
|
|
@ -9,7 +9,9 @@ Page({ |
|
|
|
data: { |
|
|
|
list:[], |
|
|
|
page:1, |
|
|
|
total:1 |
|
|
|
total:1, |
|
|
|
navList: [{title: '精彩2022', year: 2022}, {title: '回顾2021', year: 2021}], |
|
|
|
navIndex: 0 |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
@ -18,11 +20,20 @@ Page({ |
|
|
|
onLoad: function (options) { |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
onReload(e){ |
|
|
|
this.setData({ |
|
|
|
page:0, |
|
|
|
list:[], |
|
|
|
navIndex: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 |
|
|
|
page:this.data.page, |
|
|
|
year: this.data.navList[this.data.navIndex].year |
|
|
|
}).then(res=>{ |
|
|
|
this.setData({ |
|
|
|
total:res.data.total, |
|
|
|
|