# getDeviceBiometrics()

获取当前设备支持的生物识别类型

示例

this.$app.getDeviceBiometrics()
    .then(res => {
        console.log('app/getDeviceBiometrics====', JSON.stringify(res)) // 1为指纹 2为人脸
    })
    .catch(err => {
        console.log('err===', err);
        // 调用失败回调
    });

success 返回参数说明

参数 类型 说明
biometricsType Number 1:指纹,2:人脸
biometricsText String 对应文字提示信息

# fingerPrintVerification()

进行生物识别(指纹/面容)验证

示例

this.$app
            .fingerPrintVerification()
            .then(res => {
              // 调用成功回调
              console.log('app/fingerPrintVerification====', JSON.stringify(res));
            })
            .catch(err => {
              console.log('err===', err);
              // 调用失败回调
            });

success 返回参数说明:

参数名 类型 说明
code Number 调用结果编码
message string 调用结果消息内容

code 返回参数说明:

返回值 说明
0 指纹认证通过
55001 指纹信息变更
55002 设备不支持指纹识别
55003 系统取消授权
55004 用户取消验证Touch ID
55005 授权失败
55006 系统未设置密码
55007 设备Touch ID不可用
55008 TouchID未注册
55009 用户选择输入密码
55010 其他情况

# updateTouchIdInfo()

更新本的生物识别(指纹)信息,仅在支持指纹识别的设备支持,更新成功后,验证时验证更新后的指纹信息(和手机本身的认证没有关系)

示例

this.$app
    .updateTouchIdInfo()
    .then(res => {
      console.log('指纹状态更新suc:' + JSON.stringify(res));
    })
    .catch(e => {
      console.log('指纹状态更新fail:' + JSON.stringify(e));
    });

Last Updated: 6/16/2022, 11:06:05 AM