初始化 dom 的时候 有多个 dir 和 bucket 然后初始化后 全都变成了最后一个文件夹后 bucket
$('#1,#2,#3....').each(function(idx, dom) {
var $this = $(dom);
var id = $(dom).attr('id');
var type = $this.attr('data-type');
var dir = $this.attr('data-dir');
var uploaddir = 'provider/certificate';
if (dir == 'yyzz') {
uploaddir = 'provider/certificate';
} else if (dir == 'ls') {
uploaddir = 'provider/lawyerlicense';
} else if (dir == 'xkz') {
uploaddir = 'provider/license';
} else if (dir == 'card') {
uploaddir = 'provider/identity';
}
console.log(uploaddir);
$(dom).initUpload({
bucket: 'upload-in',
dir: uploaddir,
g_object_name_type: 'random_name',
init: {....
1
rxzxf1993 OP 最后初始化都是变成了 dir: 'provider/identity'
|