diff --git a/pages/API/facial-recognition-verify/facial-recognition-verify.uvue b/pages/API/facial-recognition-verify/facial-recognition-verify.uvue index b1bbd655554c33e5192407670306d094fa4173bb..7b6a226b4cce380a9b16cfe7bcf126569a4660f2 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,