From 64a7f738aadbf552bfb1ce24c46b1924767bf526 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期二, 05 九月 2023 16:00:16 +0800
Subject: [PATCH] 小程序

---
 minipro_standard/util/utils.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/minipro_standard/util/utils.js b/minipro_standard/util/utils.js
index 76809d9..db2d308 100644
--- a/minipro_standard/util/utils.js
+++ b/minipro_standard/util/utils.js
@@ -27,4 +27,19 @@
     return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', second ].join('');
 }
 
-export { gsdate, setTime }
+/***
+ *
+ * @param time 鏃ユ湡 骞存湀鏃ユ椂鍒嗙
+ * @param Sign 闂撮殧
+ */
+function setTimeO (time, Sign) {
+    let year = time.getFullYear();
+    let month = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : `0${time.getMonth() + 1}`;
+    let day = time.getDate() >= 10 ? time.getDate() : `0${time.getDate()}`;
+    let hour = time.getHours() >= 10 ? time.getHours() : `0${time.getHours()}`;
+    let minute = time.getMinutes() >= 10 ? time.getMinutes() : `0${time.getMinutes()}`;
+    let second = time.getSeconds() >= 10 ? time.getSeconds() : `0${time.getSeconds()}`;
+    return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', '00' ].join('');
+}
+
+export { gsdate, setTime, setTimeO }

--
Gitblit v1.9.3