let now = new Date();
let nowTime = now.getTime();
let day = now.getDay() || 7; //为周日的时候 day 修改为7 否则当天周天会有问题
let oneDayTime = 24 * 60 * 60 * 1000;
let MondayTime = nowTime - (day - 1) * oneDayTime; //周一
let SundayTime = nowTime + (7 - day) * oneDayTime; //周日
01-17
822
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-09
345
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-07
935
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)