From 8e095c1fd6164fafc7d5cfd144528a0d67afef7c Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 22 三月 2023 17:31:15 +0800
Subject: [PATCH] 转发页面修改
---
utils/util.js | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/utils/util.js b/utils/util.js
index f5e9768..f9b67d7 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -1,7 +1,16 @@
-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
+ let hour = date.getHours()
+ let minutes = date.getMinutes()
+ let seconds = date.getSeconds()
+ console.log(arg,'鏃堕棿');
+ 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
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1