mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-10-02 23:19:57 +08:00
Update upload.js
This commit is contained in:
parent
e3a479a5e0
commit
bc5c57fed7
@ -53,13 +53,13 @@ define(['md5'], function (SparkMD5, allowExtsMimes) {
|
|||||||
}, progress: function (n) {
|
}, progress: function (n) {
|
||||||
$('[data-upload-progress]').html(n + '%');
|
$('[data-upload-progress]').html(n + '%');
|
||||||
}, done: function (ret, index, file) {
|
}, done: function (ret, index, file) {
|
||||||
file = options.cache[index];
|
|
||||||
if (++options.count.uploaded >= options.count.total) {
|
if (++options.count.uploaded >= options.count.total) {
|
||||||
layer.close(options.loading);
|
layer.close(options.loading);
|
||||||
}
|
}
|
||||||
if (typeof ret.code === 'number' && parseInt(ret.code) === 0) {
|
if (typeof ret.code === 'number' && parseInt(ret.code) === 0) {
|
||||||
return $.msg.tips(ret.info || '文件上传失败!');
|
return $.msg.tips(ret.info || '文件上传失败!');
|
||||||
}
|
}
|
||||||
|
file = options.cache[index];
|
||||||
if (typeof ret.uploaded === 'undefined' && typeof file.xurl === 'string') {
|
if (typeof ret.uploaded === 'undefined' && typeof file.xurl === 'string') {
|
||||||
ret = {uploaded: true, url: file.xurl};
|
ret = {uploaded: true, url: file.xurl};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user