moment js如何将时间字符串转换成时间戳 先用时间字符串初始化moment对象,然后通过unix方法得到unix时间戳,方法如下: moment('时间字符串').unix() moment('2019-08-22 12:30:23').unix() 1566448223