From 1da6506bf58270bacc2a4345002c6b082835580e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 21 十月 2021 23:17:08 +0800 Subject: [PATCH] 2021-10-21 --- src/tabviews/zshare/fileupload/index.jsx | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx index 32ecbc4..3ef6469 100644 --- a/src/tabviews/zshare/fileupload/index.jsx +++ b/src/tabviews/zshare/fileupload/index.jsx @@ -48,7 +48,7 @@ origin: true } }) - } catch { + } catch (e) { filelist = [] } } @@ -61,8 +61,13 @@ accepts = ['.jpg', '.png', '.gif', '.jpeg'] accept = accepts.join(',') } else if (config.suffix) { - accepts = config.suffix.split(',') - accept = config.suffix + accepts = config.suffix.split(',').map(item => { + if (!/^\./ig.test(item)) { + item = '.' + item + } + return item + }) + accept = accepts.join(',') } let rduri = config.rduri || '' @@ -171,6 +176,7 @@ form.append('shardingCnt', param.chunks) form.append('shardingNo', param.chunk) form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') + form.append('UserID', sessionStorage.getItem('UserID') || '') Api.getLargeFileUpload(form).then(res => { if (res.status) { @@ -224,12 +230,10 @@ }) if (!pass) { - notification.warning({ - top: 92, - message: '鏂囦欢鏍煎紡閿欒锛�', - duration: 5 - }) - return + setTimeout(() => { + this.onFail('鏂囦欢鏍煎紡閿欒锛�') + }, 10) + return false } } -- Gitblit v1.8.0