LightSDK.native.preVerifyOpeation

功能描述

获取设备内是否录入如指纹等本地认证信息的接口

支持格式

JSON

请求参数:

字段 类型及范围 默认值 必填 说明
checkAuthMode string 认证方式
verifyType
【已废弃(请使用checkAuthMode参数)】
string 认证方式

checkAuthMode 的合法值

说明 最低版本
gesture 手势识别
fingerPrint 指纹识别
facial 人脸识别(Android暂不支持)

verifyType 的合法值

说明 最低版本
GL 手势识别
FP 指纹识别/人脸识别(优先级:人脸识别 > 指纹识别,Android暂不支持人脸识别)

请求调用示例

LightSDK.native.preVerifyOpeation({
checkAuthMode: "facial"
}, function (res) {
console.log(JSON.stringify(res, null, 4));
})

返回值说明

字段名 类型 说明
isEnrolled boolean 是否已录入信息
result
【已废弃(请使用isEnrolled字段)】
string 调用结果

result 的合法值

说明 最低版本
true 已录入信息
false 未录入信息

返回字段示例

{
"info": {
"error_code": "0",
"error_message": "success"
},
"data": {
"isEnrolled": true,
"result": "true"
}
}

注意事项

需要在config.js配置文件中做以下配置:(老版本的配置lock已不再提供维护)

module.exports = {
plugins: {
"localauth": {
"inputParams": {
"title": "手势密码"
},
"navigationbar": {
"disableSystemBarTint": false,
"backgroundColor": "#e81f1f"
},
"style": {
"backgroundColor": "#000000",//背景色
"headerBackgroundColor": "#ffffff",
"headerTextColor": "#ffffff",
"hintTextColor": "#ffffff",//错误提示文字颜色
"defaultColor": "#ffffff",//手势未输入状态时默认颜色
"selectedColor": "#6D90FB",//已输入手势的颜色
"inCorrectColor": "#db5329",//手势输入有误后的颜色
"lineColor": "#6D90FB",//手势输入过程中连接的线的颜色
"lineWidth": 3//线的宽度
},
"config": {
"maxNumberOfRetries": 3,//重试次数
"minNumberOfNodes": 4,//最少连接的节点个数
"freezeTime": 10//超过重试次数后的锁定时间
}
}
}
};