From 7d386fa11990ee87601cfc1faca2d4133245c654 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 26 六月 2023 14:30:00 +0800 Subject: [PATCH] 修改后台地址 --- utils/util.js | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/utils/util.js b/utils/util.js index f5e9768..7285440 100644 --- a/utils/util.js +++ b/utils/util.js @@ -1,7 +1,15 @@ -export function todayDate(){ +export function todayDate(arg) { let date = new Date() let year = date.getFullYear() let month = date.getMonth() + 1; let day = date.getDate() - return year + '-' + month + '-' + day -} \ No newline at end of file + let hour = date.getHours() + let minutes = date.getMinutes() + let seconds = date.getSeconds() + if (arg == 'hms') { + hour = hour < 10 ? '0' + hour : hour + minutes = minutes < 10 ? '0' + minutes : minutes + seconds = seconds < 10 ? '0' + seconds : seconds + return hour + ':' + minutes + ':' + seconds + } +} -- Gitblit v1.9.1