毫秒数转日期
//时间补零操作 addZero(num){ if(parseInt(num) < 10){ num = '0'+num; } return num; }, // 修改日期格式 timeFil(time) { let oDate = new Date(time); let oYear = oDate.getFullYear(); let oMonth = oDate.getMonth()+1; let oDay = oDate.getDate(); let oHour = oDate.getHours(); let oMin = oDate.getMinutes(); // let oSen = oDate.getSeconds(); let oTime = oYear +'-'+ addZero(oMonth) +'-'+ addZero(oDay) +' '+ addZero(oHour) +':'+ addZero(oMin); return oTime; }