wx.checkIsSupportSoterAuthentication({
success(res) {
console.log(res) //此处没有返回-facial
// res.supportMode = [] 不具备任何被SOTER支持的生物识别方式
// res.supportMode = ['fingerPrint'] 只支持指纹识别
// res.supportMode = ['fingerPrint', 'facial'] 支持指纹识别和人脸识别
if (res.supportMode.indexOf('facial') != -1) {
wx.startSoterAuthentication({
requestAuthModes: ['facial'],
challenge: '123456',
authContent: '请进行人脸识别',
success(res) {
console.log(res)
wx.checkIsSoterEnrolledInDevice({
checkAuthMode: 'facial',
success(res) {
console.log(res.isEnrolled)
}
})
}
})
}
}
})