const nowstr = new Date();
const datenow = nowstr.getFullYear()
+ ((nowstr.getMonth() + 1) < 10 ? "0" : "") + (nowstr.getMonth() + 1)
+ (nowstr.getDate() < 10 ? "0" : "") + nowstr.getDate()
+ (nowstr.getHours() < 10 ? "0" : "") + nowstr.getHours()
+ (nowstr.getMinutes() < 10 ? "0" : "") + nowstr.getMinutes()
+ (nowstr.getSeconds() < 10 ? "0" : "") + nowstr.getSeconds();
console.log(datenow)
201907220000
网友评论