From b0e249aa5d69791a5d9b9bec64d4e8897b4bae69 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期五, 28 三月 2025 17:32:09 +0800
Subject: [PATCH] feat:体积缩小

---
 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