提交 e8658d6f 编写于 作者: C chenruilong

fix(uni-id-co): 实人认证是否获取人脸照片改为从配置文件中配置

上级 af85fad7
......@@ -187,8 +187,7 @@
mask: false
})
const res = await uniIdCo.getFrvAuthResult({
certifyId: this.certifyId,
needAlivePhoto: 'Y_O'
certifyId: this.certifyId
})
const {
......
......@@ -23,10 +23,18 @@ module.exports = async function (params) {
this.middleware.validate(params, schema)
const { uid } = this.authInfo
const { certifyId, needAlivePhoto } = params
const { certifyId } = params
const frvNeedAlivePhoto = this.config.frvNeedAlivePhoto || 'Y_O'
const user = await userCollection.doc(uid).get()
const userInfo = user.data && user.data[0]
if (!userInfo) {
throw {
errCode: ERROR.ACCOUNT_NOT_EXISTS
}
}
const { realname_auth: realNameAuth = {} } = userInfo
// 已认证的用户不可再次认证
......@@ -42,7 +50,7 @@ module.exports = async function (params) {
const [error, res] = await catchAwait(frvManager.getAuthResult({
certifyId,
needAlivePhoto
needAlivePhoto: frvNeedAlivePhoto
}))
if (error) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册