From 241255fbe2b6db3b2ed263f1e5a9956f5f9a0ee2 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 11 六月 2024 11:40:58 +0800
Subject: [PATCH] 考试管理
---
src/utils/index.js | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/utils/index.js b/src/utils/index.js
index b46bf3a..88c408d 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -351,3 +351,24 @@
ele.className = ele.className.replace(reg, ' ')
}
}
+
+export function formatSeconds (theTime) {
+ let theTime1 = 0
+ let theTime2 = 0
+ if (theTime > 60) {
+ theTime1 = parseInt(theTime / 60)
+ theTime = parseInt(theTime % 60)
+ if (theTime1 > 60) {
+ theTime2 = parseInt(theTime1 / 60)
+ theTime1 = parseInt(theTime1 % 60)
+ }
+ }
+ let result = '' + parseInt(theTime) + '绉�'
+ if (theTime1 > 0) {
+ result = '' + parseInt(theTime1) + '鍒�' + result
+ }
+ if (theTime2 > 0) {
+ result = '' + parseInt(theTime2) + '灏忔椂' + result
+ }
+ return result
+}
\ No newline at end of file
--
Gitblit v1.8.0