我的手机华为Mate7有指纹识别功能,为什么调用生物识别API显示不支持指纹识别
发布于 5 年前 作者 xiafang 12444 次浏览 来自 问答

代码如下

ceshi:function(){

     if (wx.canIUse(‘checkIsSupportSoterAuthentication’)) {

        wx.checkIsSupportSoterAuthentication({

           success(res) {

              if (res.supportMode[0] == ‘fingerPrint’) { 

                 wx.startSoterAuthentication({

                    requestAuthModes: [‘fingerPrint’],

                    challenge: ‘123456’,

                    authContent: ‘请用指纹解锁’,

                    success(res) {

 

                    },

                    fail(res) {

                       console.log(‘用户取消了指纹识别,或调用出现错误’)

                    }

                 })

              } else {

                 console.log(‘当前设备不支持指纹识别’)

              }

           }

        })

     }

  }

5 回复

服了… 折腾了几个小时,搞半天华为都不支持,却支持什么华硕,乐视, 只有一句 “呵呵” … …

我说呢,调式了好几次,,,原来我测试的机型都不在里面,,,

华为的呢?我晕哦

居然没有华为

回到顶部