需要根据后端返回的日期格式返回相应时间戳
后端返回的数据格式:
let dateStr = 2019-04-19T10:39:10.000+0000;
直接new Date(dateStr ).getTime()
在ios的app里,会出现NAN
解决办法:转为 2019-04-19 10:39:10
dateStr = dateStr.replace(/-/g,'/').replace(/T/g,' ');
new Date(dateStr ).getTime();