index.obj.js 702 B

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