diff --git a/app/admin/view/api/upload.js b/app/admin/view/api/upload.js index d931d7d28..4f99b7d5d 100644 --- a/app/admin/view/api/upload.js +++ b/app/admin/view/api/upload.js @@ -72,12 +72,14 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) { var that = this.init(); layui.each(files, function (index, file) { that.count.total++, file.index = index, that.files[index] = file; - if (that.option.size && file.size > that.option.size) { - that.event('upload.error', {file: file}, file, '大小超限'); - } else if (!that.option.hide) { + if (!that.option.hide && !file.notify) { file.notify = new NotifyExtend(file); } - }), layui.each(files, function (index, file) { + if (that.option.size && file.size > that.option.size) { + that.event('upload.error', {file: file}, file, '大小超出限制!'); + } + }); + layui.each(files, function (index, file) { // 禁传异常状态文件 if (typeof file.xstate === 'number' && file.xstate === -1) return; // 图片限宽限高压缩 diff --git a/app/admin/view/api/upload/image.html b/app/admin/view/api/upload/image.html index 7a058e844..deeee9dd4 100644 --- a/app/admin/view/api/upload/image.html +++ b/app/admin/view/api/upload/image.html @@ -130,12 +130,14 @@