// 为民服务
toServeThePeople(){
toServeThePeople({
pageNum:1,
pageSize:15,
source:0
}).then((res) => {
this.serveThePeople = res.rows;
// 按照serveThePeople里的activityTime倒序排序
this.serveThePeople.sort((a, b) => new Date(b.activityTime) - new Date(a.activityTime));
this.serveThePeople = this.serveThePeople.slice(0, 5);
console.log(this.serveThePeople,'为民服务')
});
},
