// 格式化时间exportfunctiondateFormat(dateData, type){const date =newDate(dateData);const y = date.getFullYear();let m = date.getMonth()+1;
m = m <10?(`0${ m}`): m;let d = date.getDate();
d = d <10?(`0${ d}`): d;let h = date.getHours();
h = h <10?(`0${ h}`): h;let f = date.getMinutes();
f = f <10?(`0${ f}`): f;let s = date.getSeconds();
s = s <10?(`0${ s}`): s;if(type===1){return`${y }-${ m }-${ d }${ h }:${ f}`;}return`${y }-${ m }-${ d }${ h }:${ f}:${ s}`;}
//获取当前时间exportfunctiongetNowDate(){const NowDate =newDate();const y = NowDate.getFullYear();let m = NowDate.getMonth()+1;
m = m <10?(`0${m}`): m;let d = NowDate.getDate();
d = d <10?(`0${d}`): d;let h = NowDate.getHours();
h = h <10?(`0${h}`): h;let f = NowDate.getMinutes();
f = f <10?(`0${f}`): f;let s = NowDate.getSeconds();
s = s <10?(`0${s}`): s;return`${y}年${m}月${d}日 ${h}:${f}:${s}`;}