1.Q:日期处理
A:
timingTransmissionFormat(date){
if(!date){
return ""
}
console.log('date',date) //date 1548345600000
let finalFormatY = new Date(date).getFullYear();
let finalFormatM = new Date(date).getMonth() + 1 < 10 ? '0' + (new Date(date).getMonth() + 1) : new Date(date).getMonth() + 1;
let finalFormatD = new Date(date).getDate() < 10 ? '0' + (new Date(date).getDate()) : new Date(date).getDate();
let finalFormatH = new Date(date).getHours() <10 ? '0' + (new Date(date).getHours()):new Date(date).getHours();
let finalFormatMi = new Date(date).getMinutes()<10 ? '0' + (new Date(date).getMinutes()):new Date(date).getMinutes();
return finalFormatY + '-' + finalFormatM + '-' + finalFormatD + ' ' + finalFormatH + ':' + finalFormatMi
}