const start = new Date(new Date(new Date().toLocaleDateString()).getTime())-86400; // console.log(parseInt(start.getTime() / 1000) - 86400, 'js 取得今天0点:'); //Mon Dec 04 2017 00:00:00 GMT+0800 (中国标准时间) const end = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1)-86400; // console.log(parseInt(end.getTime() / 1000) - 86400, 'js 取得今天 23:59:59'); //Mon Dec 04 2017 23:59:59 GMT+0800 (中国标准时间)