From 1d37c375fd114212ee1419c3bbdadc81d76666a4 Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期四, 03 九月 2026 18:01:59 +0800
Subject: [PATCH] 优化

---
 src/utils/tool.js |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/utils/tool.js b/src/utils/tool.js
index 6053eb8..3b7bc4d 100644
--- a/src/utils/tool.js
+++ b/src/utils/tool.js
@@ -72,7 +72,7 @@
 export const getOccupationName = (id) => {
   const { occupationItems } = useOptionItemsStore()
   const obj = occupationItems.find(ele => ele.id == id)
-  
+
   return obj?.occupationJob || ''
 }
 
@@ -108,7 +108,7 @@
   const { occupationItems } = useOptionItemsStore()
   const occupation = occupationItems.find(ele => ele.code == occupationCode)
   if (!occupation) return ''
-  
+
   const job = occupation.jobs?.find(ele => ele.jobCode == jobCode)
   if (!job) return ''
 
@@ -131,7 +131,7 @@
   link.href = url.includes('http') ? url : $qxueyou.qxyRes + url ;
   link.download = filename || '鏂囦欢';
   link.style.display = 'none';
-  
+
   // 娣诲姞鍒版枃妗e苟瑙﹀彂鐐瑰嚮
   document.body.appendChild(link);
   link.click();
@@ -140,7 +140,7 @@
 
 export const uploadByBase64 = async function(base64, fileName, fileType = 'png') {
   if (!base64) return null
-  
+
   let blob = getBlobByBase64(base64, fileType)
   if (!blob) return null
 
@@ -177,7 +177,7 @@
       }
     }
     xhr.onerror = (evt) => { // 涓婁紶澶辫触鍥炶皟
-      store.commit("snack/error", "涓婁紶澶辫触锛�")
+      // store.commit("snack/error", "涓婁紶澶辫触锛�")
       console.log(JSON.stringify(evt.target))
       resolve(false)
     }
@@ -209,10 +209,10 @@
 
 export const getFileUrlType = (url = '') => {
   if (!url) return false;
-  
-  const suffix = url.split('.').pop().toLowerCase() 
+
+  const suffix = url.split('.').pop().toLowerCase()
   const imageExtensions = [
-    'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 
+    'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp',
     'svg', 'tiff', 'tif', 'ico', 'jfif', 'pjpeg', 'pjp',
     'apng', 'avif', 'heic', 'heif'
   ];

--
Gitblit v1.8.0