js兼容问题

1.new Date(date).getTime()在苹果手机不兼容

解决方法:

new Date(data.replace(/-/g,'/')).getTime()
data是字符串,格式类似于:‘2018-09-09 23:23:23’

你可能感兴趣的:(js兼容问题)