0.2.1 • Published 2 years ago

@dtgov/face-verify v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

人脸识别开放 | PC 客户端 SDK

更新sdk名称和版本

入参必填项数据类型描述
accountTypestring用户类型, “person” “legal”
identifierstring账号标识
certNamestring用户姓名
certNostring用户证件号码
idTypestring用户证件类型(默认 “身份证 1”)
onInitedfunction初始化回调函数, 回调参数({ bizNo:string, url:string})
onVerifySuccessfunction验证成功回调函数, 回调参数({ bizNo:string })
onVerifyFailfunction验证失败回调函数, 回调参数({ bizNo:string })
onVerifyExpirefunction验证超时回调函数,回调参数({ bizNo:string })
onErrorfunction验证出错回调函数,回调参数({ 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();