@dtgov/face-verify
v0.2.1
Published
政务人脸识别
Readme
人脸识别开放 | PC 客户端 SDK
更新sdk名称和版本
| 入参 | 必填项 | 数据类型 | 描述 | | --------------- | :----: | :------- | :---------| | accountType | 是 | string | 用户类型, “person” “legal” | | identifier | 是 | string | 账号标识 | | certName | 是 | string | 用户姓名 | | certNo | 是 | string | 用户证件号码 | | idType | 否 | string | 用户证件类型(默认 “身份证 1”) | | onInited | 是 | function | 初始化回调函数, 回调参数({ bizNo:string, url:string}) | | onVerifySuccess | 是 | function | 验证成功回调函数, 回调参数({ bizNo:string }) | | onVerifyFail | 是 | function | 验证失败回调函数, 回调参数({ bizNo:string }) | | onVerifyExpire | 否 | function | 验证超时回调函数,回调参数({ bizNo:string }) | | onError | 否 | function | 验证出错回调函数,回调参数({ bizNo:string; errorMsg:string }) |
API
const params = {
accountType: "person",
identifier: "8afac0cc59fdsafd0159f43543543dfsfds",
certNo: '345678456778877778',
certName: 'xxx',
idType: 1,
onInited: function(res){
console.log(res)
},
onVerifySuccess: function(res){
console.log(res)
},
onVerifyFail: function(res){
console.log(res)
},
onVerifyExpire: function(res){
console.log(res)
},
onError: function(res){
console.log(res)
},
}
/** 初始化 **/
const faceVerify = new _FaceVerify(params);
/** 销毁 **/
faceVerify.destory();
