//按照时间进行升序降序排列 type是传递过来的数组中的时间索引 methods是升序还是降序 如果是升序 则传递up 降序不用传
repeatTime(arr,type,methods=“up”){
const brr = arr.sort(function(a,b){
if(methods === ‘up’){
return (a[type] < b[type]) ? -1 : 1;
}else{
return (a[type] < b[type]) ? 1 : -1;
}
});
return brr;
},