From d7d5df6b2c00e9afd8c168f08522866790a57f28 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 26 Sep 2023 11:52:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AE=9E=E4=BA=BA?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E7=A4=BA=E4=BE=8B=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 5 + pages.json | 21 +++-- .../facial-recognition-verify.uvue | 91 +++++++++++++++++++ .../facial-recognition-co/index.obj.js | 26 ++++++ .../facial-recognition-co/package.json | 7 ++ 5 files changed, 143 insertions(+), 7 deletions(-) create mode 100644 pages/API/facial-recognition-verify/facial-recognition-verify.uvue create mode 100644 uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js create mode 100644 uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json diff --git a/manifest.json b/manifest.json index 35656720..5644e684 100644 --- a/manifest.json +++ b/manifest.json @@ -27,5 +27,10 @@ "uniStatistics" : { "enable" : false }, + "app": { + "duts": [ + "uni-facialRecognitionVerify" + ] + }, "vueVersion" : "3" } diff --git a/pages.json b/pages.json index 6254699c..f996fbdd 100644 --- a/pages.json +++ b/pages.json @@ -269,12 +269,12 @@ "navigationBarTitleText": "页面级下拉刷新", "enablePullDownRefresh": true } - }, - { - "path": "pages/API/get-element-by-id/get-element-by-id", - "style": { - "navigationBarTitleText": "获取节点" - } + }, + { + "path": "pages/API/get-element-by-id/get-element-by-id", + "style": { + "navigationBarTitleText": "获取节点" + } }, { "path": "pages/API/nodes-info/nodes-info", @@ -939,6 +939,13 @@ "style": { "navigationBarTitleText": "自定义TabBar" } + }, { + "path": "pages/API/facial-recognition-verify/facial-recognition-verify", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + } ], "globalStyle": { @@ -990,4 +997,4 @@ "query": "" //启动参数,在页面的onLoad函数里面得到 }] } -} +} \ No newline at end of file diff --git a/pages/API/facial-recognition-verify/facial-recognition-verify.uvue b/pages/API/facial-recognition-verify/facial-recognition-verify.uvue new file mode 100644 index 00000000..b1bbd655 --- /dev/null +++ b/pages/API/facial-recognition-verify/facial-recognition-verify.uvue @@ -0,0 +1,91 @@ + + + + + diff --git a/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js b/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js new file mode 100644 index 00000000..8cd050f6 --- /dev/null +++ b/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js @@ -0,0 +1,26 @@ +// 注意本文件为实人认证API示例代码,如需在业务中使用需补充业务逻辑,比如用户需要登录才能使用实人认证、限制每个用户每天能实人认证的次数等 +module.exports = { + _before() { + this.frvManager = uniCloud.getFacialRecognitionVerifyManager({ + requestId: this.getUniCloudRequestId() + }) + }, + async getCertifyId({ + realName, + idCard, + metaInfo + } = {}) { + const result = await this.frvManager.getCertifyId({ + realName, + idCard, + metaInfo + }) + return result + }, + async getAuthResult(certifyId) { + const result = await this.frvManager.getAuthResult({ + certifyId + }) + return result + } +} \ No newline at end of file diff --git a/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json b/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json new file mode 100644 index 00000000..4c910500 --- /dev/null +++ b/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json @@ -0,0 +1,7 @@ +{ + "name": "facial-recognition-co", + "dependencies": {}, + "extensions": { + "uni-cloud-verify": {} + } +} \ No newline at end of file -- GitLab