"libVersion": "2.14.1",
手机华为荣耀20
代码:
wx.checkIsSupportFacialRecognition({
checkAliveType: 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,
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)
}
});
提供下appid和联系邮箱
谢邀,这个问题俺也不会,代你查了下文档: https://developers.weixin.qq.com/community/business/doc/000442d352c1202bd498ecb105c00d
表1:checkAliveType的值和对应的解释: 2 | 先检查是否可以屏幕闪烁,不可以则自动为读数字。
据此推断,2的时候,手机支持闪烁就闪烁,不支持才是读数字。