From 38b5297cbfbe3d61ee2e800b51e8324ee163f43e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 18 一月 2021 12:24:50 +0800
Subject: [PATCH] 2021-01-18

---
 src/tabviews/zshare/fileupload/index.jsx |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx
index 925ef09..e42c173 100644
--- a/src/tabviews/zshare/fileupload/index.jsx
+++ b/src/tabviews/zshare/fileupload/index.jsx
@@ -5,7 +5,6 @@
 import { Upload, Button, Icon, Progress, notification } from 'antd'
 import SparkMD5 from 'spark-md5'
 import Api from '@/api'
-import Utils from '@/utils/utils.js'
 import './index.scss'
 
 let service = ''
@@ -122,6 +121,16 @@
     })
   }
 
+  getuuid = () => {
+    let uuid = []
+    let _options = '0123456789abcdefghigklmnopqrstuv'
+    for (let i = 0; i < 19; i++) {
+      uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
+    }
+    uuid = uuid.join('')
+    return uuid
+  }
+
   beforeUpload = (file) => {
     const { accept } = this.props
 
@@ -165,7 +174,7 @@
     params.file.fileChunks = chunks                                // 璁板綍鎵�鏈塩hunks鐨勯暱搴�
 
     if (!/^[A-Za-z0-9]+$/.test(params.file.fileName)) {            // 鏂囦欢鍚嶇О鍚湁鑻辨枃鍙婃暟瀛椾箣澶栧瓧绗︽椂锛屽悕绉扮郴缁熺敓鎴�
-      params.file.fileName = moment().format('YYYYMMDDHHmmss') + Utils.getuuid().substr(14)
+      params.file.fileName = moment().format('YYYYMMDDHHmmss') + this.getuuid()
     }
 
     totalFileReader.readAsArrayBuffer(file)

--
Gitblit v1.8.0