微信小程序API 生物認(rèn)證

2022-05-10 16:05 更新

wx.checkIsSupportSoterAuthentication(OBJECT)


基礎(chǔ)庫(kù) 1.5.0 開(kāi)始支持,低版本需做兼容處理

獲取本機(jī)支持的 SOTER 生物認(rèn)證方式

Object參數(shù)說(shuō)明:

參數(shù) 類型 必填 說(shuō)明
success Function 接口調(diào)用成功的回調(diào)函數(shù)
fail Function 接口調(diào)用失敗的回調(diào)函數(shù)
complete Function 接口調(diào)用結(jié)束的回調(diào)函數(shù)(調(diào)用成功、失敗都會(huì)執(zhí)行)

success返回參數(shù)說(shuō)明:

參數(shù)名 類型 說(shuō)明
supportMode StringArray 該設(shè)備支持的可被SOTER識(shí)別的生物識(shí)別方式
errMsg String 接口調(diào)用結(jié)果

supportMode 有效值:

說(shuō)明
fingerPrint 指紋識(shí)別
facial 人臉識(shí)別(暫未支持)
speech 聲紋識(shí)別(暫未支持)

示例代碼:

wx.checkIsSupportSoterAuthentication({
success(res) {
// res.supportMode = [] 不具備任何被SOTER支持的生物識(shí)別方式
// res.supportMode = ['fingerPrint'] 只支持指紋識(shí)別
// res.supportMode = ['fingerPrint', 'facial'] 支持指紋識(shí)別和人臉識(shí)別
}
})


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)