From 79745a1b12fa6d69edd3a353cb11b8ae02b8d4aa Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 26 八月 2024 17:16:53 +0800 Subject: [PATCH] 投递与确认 --- src/common/utils/util.js | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/common/utils/util.js b/src/common/utils/util.js index ed91b33..15c3344 100644 --- a/src/common/utils/util.js +++ b/src/common/utils/util.js @@ -133,11 +133,18 @@ parseInt(t[2], 10) || null )).getTime() / 1000; }, - formatDate(date) { - const year = date.getFullYear(); - const month = (date.getMonth() + 1).toString().padStart(2, '0'); - const day = date.getDate().toString().padStart(2, '0'); - return `${year}-${month}-${day}`; + formatDate(dat, type) { + let date = new Date(dat) + console.log(date, dat, type); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + if (type) { + return `${year}-${month}-${day} ${hours}:${minutes}`; + } + return `${year}-${month}-${day}`; }, /** * 鍊掕鏃� @@ -703,4 +710,4 @@ typeof callback == 'function' && callback(theRequest); } -} +} \ No newline at end of file -- Gitblit v1.9.1