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

2022-05-10 16:05 更新

wx.checkIsSupportSoterAuthentication(OBJECT)


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

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

Object參數(shù)說明:

參數(shù) 類型 必填 說明
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ù)說明:

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

supportMode 有效值:

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

示例代碼:

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


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

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號