LightSDK.native.verifyOpeation

功能描述

通过js调用手势或指纹验证

支持格式

Json

请求参数:

字段 可选 类型及范围 说明
verifyType string 验证方式(FP:指纹 GL:手势)
GLOpeationType string 只有verifyType为GL才可用,字段说明verify:手势验证 set:手势设置 update:手势更新 close:清除手势(需要用户先进行手势验证操作) clear:清除手势(无需用户进行手势验证,直接执行清除手势操作),不传时则默认为verify字段效果
otherTitle string 其他方式点击按钮title
additionalTitle string 附加方式点击按钮title

请求调用示例

params={
"verifyType":"FP"
}
LightSDK.native.verifyOpeation(params,cb);

返回值说明

字段名 字段类型 说明
result string 返回是否成功(success:验证成功,fail:验证失败,other:选择其他方式验证,additional:选择附加方式验证,cancel:手势页面返回按钮事件或指纹取消方式验证)

返回字段示例

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

注意事项

需要在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//超过重试次数后的锁定时间
}
}
}
};

效果