js 时间字符串
function getLocalTime(){
let year = new Date().getFullYear()
let month = new Date().getMonth()+1
let day = new Date().getDate()
let hour = new Date().getHours()
let minute = new Date().getMinutes()
let second = new Date().getSeconds()
return `${year}-${month}-${day} ${hour}:${minute}:${second}`
}
getLocalTime()
有什么不同见解可以在评论区共同讨论