From 4fabfe4dbd2eb28d07a4350597d314958cc1c281 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 09 十月 2025 11:16:43 +0800
Subject: [PATCH] 优化

---
 admin/src/utils/util.js |   47 -----------------------------------------------
 1 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/admin/src/utils/util.js b/admin/src/utils/util.js
index d1b2aff..bc975bc 100644
--- a/admin/src/utils/util.js
+++ b/admin/src/utils/util.js
@@ -18,50 +18,3 @@
   }
   return data
 }
-
-/**
- * 鏍规嵁鏂囦欢url 杩斿洖鏂囦欢绫诲瀷
- * @param {鏂囦欢url} url 
- * @returns 1銆佸浘鐗囩被鍨�  2銆乸df绫诲瀷 3銆佸叾浠栫被鍨�
- */
-export function fileType(url) {
-  let lastStr = url.slice(url.lastIndexOf('.')+1).toLocaleLowerCase()
-  if (['bmp','jpg','jpeg','png','tif','gif','pcx','tga','exif','fpx','svg','psd','cdr','pcd','dxf','ufo','eps','ai','raw','WMF','webp','avif','apng'].indexOf(lastStr) != -1) {
-    // 鍥剧墖
-    return 1
-  } else if (lastStr === 'pdf') {
-    // pdf
-    return 2
-  } else {
-    // 鍏朵粬
-    return 3
-  }
-}
-
-//涓嬮潰鏄竴涓�氱敤杈冮珮鐨勮嚜瀹氫箟鏃ユ湡鏃堕棿鏍煎紡鍖栧嚱鏁扮殑绀轰緥锛�
-export function formatDateTime(date, format) {
-  const o = {
-    'M+': date.getMonth() + 1, // 鏈堜唤
-    'd+': date.getDate(), // 鏃�
-    'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 灏忔椂
-    'H+': date.getHours(), // 灏忔椂
-    'm+': date.getMinutes(), // 鍒�
-    's+': date.getSeconds(), // 绉�
-    'q+': Math.floor((date.getMonth() + 3) / 3), // 瀛e害
-    S: date.getMilliseconds(), // 姣
-    a: date.getHours() < 12 ? '涓婂崍' : '涓嬪崍', // 涓婂崍/涓嬪崍
-    A: date.getHours() < 12 ? 'AM' : 'PM', // AM/PM
-  };
-  if (/(y+)/.test(format)) {
-    format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
-  }
-  for (let k in o) {
-    if (new RegExp('(' + k + ')').test(format)) {
-      format = format.replace(
-        RegExp.$1,
-        RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
-      );
-    }
-  }
-  return format;
-}

--
Gitblit v1.9.3