对后端返回的时间进行升序的排序
other.sort(function(a,b){
let startTime=a.time.replace(/\-/g, '/')
let endstTime=b.time.replace(/\-/g, '/')
return Date.parse(startTime) - Date.parse(endstTime);//时间正序
})
时间格式:[
{'time':'2018-9-10 0-0-0','first':'page'},
{'time':'2018-9-10 0-0-0','first':'page'},
{'time':'2018-9-10 0-0-0','first':'page'},
{'time':'2018-9-10 0-0-0','first':'page'}
]