function timeStamp(value) {
let time=Date.parse(new Date())+24*60*60*1000;
let date = new Date(time); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
let year = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2);
let sdate = ("0" + date.getDate()).slice(-2);
let hour = ("0" + date.getHours()).slice(-2);
let minute = ("0" + date.getMinutes()).slice(-2);
let second = ("0" + date.getSeconds()).slice(-2);
// 拼接
let result = year + "-" + month + "-" + sdate + " " + hour + ":" + minute //+ ":" + second;
//let result = month + "." + sdate //+ ":" + second;
// 返回
return result;
}
返回 2022-06-06 21:39