/** * Created by hzd on 2017/10/23. */ /** * 移除图片 */ function removePic(_self,deleteurl){ $(_self).parent().remove(); if(deleteurl){ $.post(deleteurl,{path:$(_self).parent().find('img').attr('src')}); } } /** * 图片上传 */ function imgfiveup (object){ /* */ this.target = object.target?object.target:"#imgUpload", //上传按钮id this.progress = object.progress?object.progress:"#progress",//进度条id this.imgbox = object.imgbox?object.imgbox:"#imgsbox",//头像图片id this.multi = object.multi?object.multi:false; //多图/单图 this.name = object.name?object.name:'img'; //表单name this.deleteurl = object.deleteurl?object.deleteurl:''; //表单name if(this.multi){ this.name = this.name+'[]'; $(this.target).attr('multiple','multiple'); }else{ $(this.target).removeAttr('multiple'); } that = this; this.upload = function(){ $(that.target).fileupload({ dataType: 'json', done: function (e, data) { if (data.result && data.result.status == 1) { /*