index.obj.js 702 字节
Newer Older
雪洛's avatar
雪洛 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
// 注意本文件为实人认证API示例代码,如需在业务中使用需补充业务逻辑,比如用户需要登录才能使用实人认证、限制每个用户每天能实人认证的次数等
module.exports = {
  _before() {
    this.frvManager = uniCloud.getFacialRecognitionVerifyManager({
      requestId: this.getUniCloudRequestId()
    })
  },
  async getCertifyId({
    realName,
    idCard,
    metaInfo
  } = {}) {
    const result = await this.frvManager.getCertifyId({
      realName,
      idCard,
      metaInfo
    })
    return result
  },
  async getAuthResult(certifyId) {
    const result = await this.frvManager.getAuthResult({
      certifyId
    })
    return result
  }
}