//排序
sortBy(){
//乱序
if(key=='random'){
this.list.sort(function(a,b) {
return Math.random() - 0.5;
})
return this.list;
}
//点赞数从高到底排序
sortPeopleList:function(){
this.peopleList.sort(function(a,b){
return b.praisedNum - a.praisedNum;
})
return this.peopleList;
}
}