From 1f95bc529140ffc07a638d5c4669ab1fc7893715 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 20 Oct 2023 21:14:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E4=BA=BA=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=87=BA=E9=94=99=E6=97=B6=E7=BB=99=E5=87=BA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facial-recognition-verify.uvue | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pages/API/facial-recognition-verify/facial-recognition-verify.uvue b/pages/API/facial-recognition-verify/facial-recognition-verify.uvue index b1bbd655..7b6a226b 100644 --- a/pages/API/facial-recognition-verify/facial-recognition-verify.uvue +++ b/pages/API/facial-recognition-verify/facial-recognition-verify.uvue @@ -6,10 +6,12 @@ - + - + @@ -31,11 +33,6 @@ } }, onReady() { - uni.showModal({ - title: '提示', - content: '注意:目前uni-app x内使用实人认证功能需要打包自定义基座。', - showCancel: false - }) }, methods: { facialRecognition() { @@ -50,7 +47,19 @@ return } const testFacialCo = uniCloud.importObject('facial-recognition-co') - const metaInfo = uni.getFacialRecognitionMetaInfo(); + let metaInfo : string + try { + metaInfo = uni.getFacialRecognitionMetaInfo(); + } catch (e) { + if (e.message!.indexOf('Failed resolution of') > -1) { + uni.showModal({ + title: '提示', + content: '注意:目前uni-app x内使用实人认证功能需要打包自定义基座。', + showCancel: false + }) + } + throw e + } testFacialCo.getCertifyId({ realName, idCard, -- GitLab