//检查是否支持生物认证
uni.checkIsSupportSoterAuthentication({
success:(res)=> {
//console.log(res);
wx.startFacialRecognitionVerify({//小程序获取验证结果
name: ‘’,//用户名称
idCardNumber: '',//身份证号码
success: (red)=>{
if(red.errMsg == 'startFacialRecognitionVerify:ok'){
//console.log(red,'人脸识别结果:success');
}
},
fail:(err)=>{
//console.log(err,'人脸识别结果:fail')
uni.showToast({
title: '人脸识别失败',
icon: 'none',
duration: 20000,
});
}
})
},
fail: (err)=> {
console.log('支持生物认证失败', err);
}
})
uni-app 微信小程序 人脸识别认证
猜你喜欢
转载自blog.csdn.net/ssnnyyjj/article/details/128257339
今日推荐
周排行