[...Array(7).keys()].map(days => this.time(days));
time(e){
let date=new Date(Date.now() + 86400000 * e*2)
return date.getFullYear()+"-"+[(date.getMonth()+1)>10?(date.getMonth()+1):"0"+(date.getMonth()+1)]+"-"+[date.getDate()>10?date.getDate():'0'+date.getDate()]
},
网友评论