js获取当前时间
let year = new Date().getFullYear();
let month = (new Date().getMonth() + 1) < 10 ? '0'+(new Date().getMonth()+1): new Date().getMonth()+1;
let day = new Date().getDate()<10 ? '0'+new Date().getDate():new Date().getDate();
let hour = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours();
let minute = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes();
let second = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds();
let currentTime = year+"-"+month+"-"+day+" "+ hour+':'+minute+':'+second;

浙公网安备 33010602011771号