js 中 getMonth() 获取的月份比现实少一个月 原因: 在 js getMonth()获取月份时比现实少一个月是因为在计算时,是从0开始算起,一月份为0月 解决办法: 在获取到的月份再加1 const month = new Date().getMonth()+1