const now = new Date();
const nowTime = now.getTime() ;
const oneDayTime = 24*60*60*1000 ;
const arry = [-3,-2,-1,0,1,2,3];
const weekDate=[]
for(let item of arry){
const ShowTime = nowTime + item*oneDayTime ;
//初始化日期时间
const myDate = new Date(ShowTime);
const year=myDate.getFullYear();
const month=myDate.getMonth()+1;
const date=myDate.getDate();
const week="日一二三四五六".charAt(myDate.getDay())
weekDate.push( {year,month,date,week} )
}