diff --git a/manifest.json b/manifest.json index 3565672073c39719c9e48ad31a573487bd447681..5644e684dc448688844ffce447f98ee01fc7bc00 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 6254699c8ad8ae8dc68f988032837a96f049e7e0..f996fbddff98e3a4fcd21ce7de796e1300a4a2b5 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 0000000000000000000000000000000000000000..b1bbd655554c33e5192407670306d094fa4173bb --- /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 0000000000000000000000000000000000000000..8cd050f6b6ec30d7721e7948fd8079029fd32675 --- /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 0000000000000000000000000000000000000000..4c910500a846c2f1eb1d61c9daab052039a71226 --- /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