From cbfc1953c7e7333dbcb1e43fff15433ed24fc543 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期日, 08 十月 2023 17:28:32 +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