1. const moment = require('moment'); //时间日期转换模块
    2. 获取当前时间戳 秒级
    3. let newTimes = Math.round(new Date().getTime() / 1000)
    4. 时间戳转日期 注意 HH表示24小时 hh表示12小时制
    5. let rrecently = moment.unix(newTimes).format("YYYY-MM-DD HH:mm:ss");//使用时间
    6. 日期转时间戳
    7. let d =moment(time).unix();//日期转时间戳
    8. 时间戳对比
    9. let res= Math.round(new Date().getTime()/1000)
    10. let res2= Math.round(new Date().getTime()/1000+10 )
    11. let b= moment(res2).diff(moment(res), 'X');//小写x表示毫秒,大写X表示秒 ==>相差 10 秒
    12. Res2 是过期时间 res 是当前时间