删除多余的上传身份证正面
This commit is contained in:
parent
5ba77e87c0
commit
aeafb44b8a
@ -653,35 +653,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
// 上传身份证正面
|
||||
var uploadInst = likeupload.render({
|
||||
elem: '#id-front' //绑定元素
|
||||
,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
|
||||
,accept: 'images'
|
||||
,data: {type: 'id_card'}
|
||||
,exts: "jpg|png|jpeg"
|
||||
,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
|
||||
layer.load(); //上传loading
|
||||
}
|
||||
,done: function(res, index, upload){
|
||||
if (res.code === 1) {
|
||||
var template = '<div class="upload-image-div">';
|
||||
template += '<img src="'+ res.data.file +'" alt="img">';
|
||||
template += '<div class="del-upload-btn">x</div>';
|
||||
$("#id-front").parent().before(template)
|
||||
|
||||
$("input[name='idFront']").val(res.data.file)
|
||||
} else {
|
||||
layer.msg('上传错误');
|
||||
return false;
|
||||
}
|
||||
layer.closeAll('loading'); //关闭loading
|
||||
}
|
||||
,error: function(index, upload){
|
||||
layer.closeAll('loading'); //关闭loading
|
||||
}
|
||||
});
|
||||
|
||||
// 上传身份证反面
|
||||
var uploadInst = likeupload.render({
|
||||
elem: '#id-back' //绑定元素
|
||||
|
||||
Loading…
Reference in New Issue
Block a user