1.uni 插件库搜索 AThree-Face
2.const face = uni.requireNativePlugin('AThree-Face');
function startDetect(type) {
setTimeout(async (res) => {
const [err, data] = await CommonApi.getBizToken({
type: 1
})
if (data.code != 200) return
const biztoken = data.data.bizToken
console.log('biztokenbiztokenbiztoken',biztoken)
face.startFace({
//biztoken获取方式请参考腾讯人脸核身文档(https://cloud.tencent.com/document/product/1007/31816).
biztoken: biztoken,
}, async result => {
if (result.errorcode == 0) {
//成功
}
})
}, 10)
}