【uniapp】指纹识别

本文介绍了使用uniapp进行生物认证,特别是指纹识别的步骤。首先,需要在manifest.json中进行配置,然后调用uniapp的官方API,包括uni.checkIsSupportSoterAuthentication来检查设备支持的认证方式,uni.checkIsSoterEnrolledInDevice判断指纹是否已录入,最后通过uni.startSoterAuthentication启动指纹认证过程。
摘要由CSDN通过智能技术生成


前言

最近项目有一个指纹登录的功能,做个记录。


一、uniapp 生物认证(指纹或者面容ID)

https://uniapp.dcloud.io/api/system/authentication

二、流程图

在这里插入图片描述

1.manifest.json勾选配置

在这里插入图片描述

2.调用官方api

  • 第一步:uni.checkIsSupportSoterAuthentication: 获取本机支持认证方式,res.supportMode = [‘fingerPrint’] 只支持指纹识别,res.supportMode = [‘fingerPrint’, ‘facial’] 支持指纹识别和人脸识别。

  • 第二步: uni.checkIsSoterEnrolledInDevice : 获取设备内是否录入指纹信息

  • 第三步:uni.startSoterAuthentication开始 SOTER 生物认证

<template>
  <view>
    <view>{
   {
    result }}</view>
  </view>
</template>
<script>
export default {
   
  data() {
   
    return {
   
      result: ''
    }
  },
  onLoad() {
   
    this.checkIsSupportSoterAuthentication()
  }
  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值