微信小程序API生物認證,獲取本機支持的 SOTER 生物認證方式
2020-09-27
導讀:wx.checkIsSupportSoterAuthentication(OBJECT) 基礎庫 1.5.0 開始支持,低版本需做兼容處理 獲取本機支持的 SOTER 生物認證方式 Object參數說明: 參數 類型 必填 說明 success Function 否 接口調用成功的...
wx.checkIsSupportSoterAuthentication(OBJECT)
基礎庫 1.5.0 開始支持,低版本需做兼容處理
獲取本機支持的 SOTER 生物認證方式
Object參數說明:
參數 | 類型 | 必填 | 說明 |
---|---|---|---|
success | Function | 否 | 接口調用成功的回調函數 |
fail | Function | 否 | 接口調用失敗的回調函數 |
complete | Function | 否 | 接口調用結束的回調函數(調用成功、失敗都會執行) |
success返回參數說明:
參數名 | 類型 | 說明 |
---|---|---|
supportMode | StringArray | 該設備支持的可被SOTER識別的生物識別方式 |
errMsg | String | 接口調用結果 |
supportMode 有效值:
值 | 說明 |
---|---|
fingerPrint | 指紋識別 |
facial | 人臉識別(暫未支持) |
speech | 聲紋識別(暫未支持) |
示例代碼:
wx.checkIsSupportSoterAuthentication({
success(res) {
// res.supportMode = [] 不具備任何被SOTER支持的生物識別方式
// res.supportMode = ['fingerPrint'] 只支持指紋識別
// res.supportMode = ['fingerPrint', 'facial'] 支持指紋識別和人臉識別
}
})
更多微信小程序開發教程,可以關注hi小程序。
第二部分:如何開通一個小商店