//获取当前时间
const getCurrentTime = () => {
let now = new Date()
let year = now.getFullYear()
let month = now.getMonth() + 1
let date = now.getDate()
let hours = now.getHours()
let minutes = now.getMinutes()
let seconds = now.getSeconds()
let formattedDateTime = `${year}-${month.toString().padStart(2, '0')}-${date
.toString()
.padStart(2, '0')} ${hours.toString().padStart(2, '0')}:${minutes
.toString()
.padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`
return formattedDateTime
}