diff --git a/pages/work/work.js b/pages/work/work.js index 67629e0..43a8565 100644 --- a/pages/work/work.js +++ b/pages/work/work.js @@ -61,7 +61,7 @@ Page({ res.data.list = res.data.list.reverse(); let curMonth = new Date().getMonth() - 0 + 1 let communitySelfInspTop = res.data.list.filter(item => item.monthName-0 === curMonth).length?res.data.list.filter(item => item.monthName-0 === curMonth)[0]:{} - let communitySelfInspList = res.data.list.filter(item => item.monthName-0 !== curMonth) + let communitySelfInspList = res.data.list.filter(item => item.monthName-0 !== curMonth).splice(0,2) this.setData({ communitySelfInspTop,communitySelfInspList,curMonth })