小程序指纹识别功能真机测试

testFinger: function () {

console.log('测试指纹认证')

if (wx.checkIsSupportSoterAuthentication) {

wx.checkIsSupportSoterAuthentication({

success(res) {

console.log(res)

// res.supportMode = [] 不具备任何被SOTER支持的生物识别方式

// res.supportMode = ['fingerPrint'] 只支持指纹识别

// res.supportMode = ['fingerPrint', 'facial'] 支持指纹识别和人脸识别

}

})

} else {

wx.showModal({

title: '提示',

content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'

})

}

}

模拟器基础库,1.9.94

测试结果,IphoneX 返回支持指纹验证,锤子手机返回支持指纹验证,其他iphone系列手机返回支持指纹验证,没有指纹识别功能的安卓机(小米)返回空数组,360N4s(支持指纹解锁)返回空数组

猜你喜欢

转载自blog.csdn.net/tengxi_5290/article/details/80198263