$("#uploadfile").fileinput({
theme: 'explorer-fa',
uploadUrl: upload_url + "?catalog=9",
language: 'zh',
overwriteInitial: false,
initialPreviewAsData: true,
maxFileCount: 3,
initialPreview: pics,
initialPreviewConfig: pic_configs,
showAjaxErrorDetails:true
}).on("fileuploaded", function (event, data, previewId, index) { //上传成功的回调
console.log("上传成功");
var file_url = data.response.url;
//增加隐藏域
$("#" + previewId).find(".kv-file-remove").attr("data-key", file_url);
$("#" + previewId).append("<input type='hidden' name='logos[]' value='" + file_url + "' />");
}).on('filedeleted', function (event, id, index) { //删除原图片成功的回调
console.log('id = ' + id + ', index = ' + index);
alert("删除原图成功时的回调");
}).on('filesuccessremove', function (event, key) { //删除新图片的回调
//走ajax删除临时图片
var file_path = $("#" + key).find(".kv-file-remove").attr("data-key");
ajaxDelOssTemp(del_url, file_path);
});