人脸识别 调试的过程中,发现传送参数0、1、2均为屏幕闪烁,无法调用读数。应该怎么处理?
"libVersion": "2.14.1",
手机华为荣耀20
代码:
wx.checkIsSupportFacialRecognition({
checkAliveType: 0,//屏幕闪烁(人脸核验的交互方式,默认0,读数字)
success: function (res) {
if (res.errCode === 0 || res.errMsg === "checkIsSupportFacialRecognition:ok") {
//调用人脸识别
that.facialRecognitionVerify(that.data.formData.name.replace(/(^\s*)|(\s*)$/g, ""), that.data.formData.idcard); //身份证名称,身份证号码
return;
}
wx.showModal({
title: '提示',
showCancel: false,
content: "微信版本过低,暂时无法使用此功能,请升级微信最新版本!",
success: function (res) {}
});
},
fail: function (res) {
wx.showModal({
title: '提示',
showCancel: false,
content: "微信版本过低,暂时无法使用此功能,请升级微信最新版本!!" ,
success: function (res) {}
});
},
complete:function(res){
console.log("complete:",res)
}
})
wx.startFacialRecognitionVerify({
checkAliveType: 0,//屏幕闪烁(人脸核验的交互方式,默认0,读数字)
name: name, //姓名
idCardNumber: idCardNumber, //身份证号
//人脸识别成功回调通知
success: function (res) {
var verifyResult = res.verifyResult;
if (res.errCode === 0 || 'startFacialRecognitionVerify:ok' == res.errMsg) {
wx.showModal({
title: '提示',
showCancel: false,
content: "验证成功",
success: function (res) {
}
});
} else {
wx.showModal({
title: '提示',
showCancel: false,
content: "人脸识别失败!",
success: function (res) {}
});
}
},
//人脸识别失败的回调通知
fail: function (res) {
console.log(res)
wx.showModal({
title: '提示',
showCancel: false,
content: "人脸识别失败!" + res.errMsg,
success: function (res) {
}
});
},
complete:function(res){
console.log("complete:",res)
}
});