最终效果:


使用方式:





           

身份证正面





身份证反面






基本信息























        // 附件
controls.F_entryVoucherUrl=new $tgUpload($,"F_entryVoucherUrl",{modelName:'entryVoucher',mediaType:'allmedia',from:'camera',targetLen:40,number:5});
// 单个图片附件
controls.F_headImageUrl=new $tgSingleImgUpload($,"F_headImageUrl",{modelName:'HeadImg',mediaType:'picture',from:'camera',targetLen:40});
controls.F_positiveIDCardImageUrl = new $tgSingleImgUpload($,"F_positiveIDCardImageUrl",{modelName:'IDCardImage',mediaType:'picture',from:'camera'},
function(url){ pageview.getPositiveIDCardImageData(url);});
controls.F_negativeIDCardImageUrl = new $tgSingleImgUpload($,"F_negativeIDCardImageUrl",{modelName:'IDCardImage',mediaType:'picture',from:'camera'},
function(url){ pageview.getNegativeIDCardImageData(url);});



     // 调后台接口,识别身份证正面信息
pageview.getPositiveIDCardImageData=function(imgUrl){
bui.ajax({
url: "/RN/RNCommon/GetPositiveIDCardImageData",
data: { imgUrl:imgUrl },
method: "POST"
}).then((result)=>{



},function(result,status){
// 失败 console.log(status)
});
};

// 调后台接口,识别身份证反面信息
pageview.getNegativeIDCardImageData=function(imgUrl){
bui.ajax({
url: "/RN/RNCommon/GetNegativeIDCardImageData",
data: { imgUrl:imgUrl },
method: "POST"
}).then((result)=>{


},function(result,status){
// 失败 console.log(status)
});
};


     // 从后台取表单数据
pageview.setModelData=function(){
formData={
F_entryVoucherUrl:"https://www.easybui.com/uploads/20230112/cf2a0fe397f02d4d057d1c624002c933.jpg,https://www.easybui.com/uploads/20230112/85d94ea3d138deba162b2627d6819e00.jpg",
F_headImageUrl:"https://www.easybui.com/uploads/20220913/0cd68204cd30cba5efc537de3ef65a2f.jpg",
F_positiveIDCardImageUrl:"",
F_negativeIDCardImageUrl:"",
};
$fm.setFormData(controls,formData);
};
// 保存
pageview.getModelData=function(){
formData = $fm.getFormData(controls);
console.log(formData);
};












点赞(3)

Comment list 共有 0 条评论

暂无评论
订阅
更新

微信公众账号

微信扫一扫加关注

扫码
加群

BUI开发者交流群2

QQ扫码加群

扫码
体验

微信小程序

微信扫一扫体验

立即
投稿
发表
评论
返回
顶部