getCurrentTime(){
let dataTime=''
let yy = new Date().getFullYear()
let mm = new Date().getMonth()+1
let dd = new Date().getDate()
let hh = new Date().getHours()
let mf = new Date().getMinutes()<10?'0'+new Date().getMinutes():
new Date().getMinutes()
let ss = new Date().getSeconds()<10?'0'+new Date().getSeconds():
new Date().getSeconds()
dataTime = `${yy}-${mm}-${dd}`
// ${hh}:${mf}:${ss};
return dataTime
},
格式化显示时间js 微信小程序
最新推荐文章于 2024-07-23 08:19:52 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)