在小程序js文件中获取当前时间戳的方法
```
var timestamp = Date.parse(new Date())
```
但是在wxs中不能上面这样获取时间戳
需要下面这样才能获取当前时间戳
```
getDate().getTime()
以下是util.js 获取时间函数
constformatTime=date=>{
constyear=date.getFullYear()
constmonth=date.getMonth()+1
constday=date.getDate()
consthour=date.getHours()
constminute=date.getMinutes()
constsecond=date.getSeconds()
returnyear+'-'+month+'-'+day
return[year,month,day].map(formatNumber).join('/')+''+[hour,minute,second].map(formatNumber).join(':')
}