**
js判断当前日期是否为本周.
**
代码如下
sameWeek(day) {//当前日期
let sameWeek=false;
let time=new Date();
let ye=time.getFullYear();
let mo= time.getMonth()+1;
let da= time.getDate();
let week= time.getDay();
let beforeWeek=new Date(day).getTime();
let nextWeek=new Date(`${ye}-${mo}-${da} 00:00:00`).getTime()+(8-week)*24*60*60*1000;
beforeWeek>nextWeek?sameWeek=true:sameWeek=false;
return sameWeek; //返回是否本周;
}