From 3b44f782b1299355f0198fb20cb5ddb53d0ec827 Mon Sep 17 00:00:00 2001 From: "https://gitee.com/WALL_EYE" Date: Mon, 6 Jun 2022 15:11:17 +0800 Subject: [PATCH] fix result code Signed-off-by: https://gitee.com/WALL_EYE Change-Id: I26c49e6b8d8a7d531a5022f48627e82b621e4454 --- .../reference/apis/js-apis-useriam-userauth.md | 8 ++++---- zh-cn/application-dev/security/userauth-guidelines.md | 2 +- .../device-dev/driver/driver-peripherals-face_auth-des.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md b/zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md index feecb98ea5..a1662dff87 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md +++ b/zh-cn/application-dev/reference/apis/js-apis-useriam-userauth.md @@ -50,7 +50,7 @@ export default { try { console.info("auth onResult result = " + result); console.info("auth onResult extraInfo = " + JSON.stringify(extraInfo)); - if (result == 'SUCCESS') { + if (result == userIAM_userAuth.ResultCode.SUCCESS) { // 此处添加认证成功逻辑 } else { // 此处添加认证失败逻辑 @@ -97,7 +97,7 @@ export default { } }); let cancelCode = this.auth.cancel(contextId); - if (cancelCode == userIAM_userAuth.Result.SUCCESS) { + if (cancelCode == userIAM_userAuth.ResultCode.SUCCESS) { console.info("cancel auth success"); } else { console.error("cancel auth fail"); @@ -443,7 +443,7 @@ onResult: (result : number, extraInfo : AuthResult) => void try { console.info("auth onResult result = " + result); console.info("auth onResult extraInfo = " + JSON.stringify(extraInfo)); - if (result == SUCCESS) { + if (result == userIAM_userAuth.ResultCode.SUCCESS) { // 此处添加认证成功逻辑 } else { // 此处添加认证失败逻辑 @@ -492,7 +492,7 @@ onAcquireInfo ?: (module : number, acquire : number, extraInfo : any) => void try { console.info("auth onResult result = " + result); console.info("auth onResult extraInfo = " + JSON.stringify(extraInfo)); - if (result == SUCCESS) { + if (result == userIAM_userAuth.ResultCode.SUCCESS) { // 此处添加认证成功逻辑 } else { // 此处添加认证失败逻辑 diff --git a/zh-cn/application-dev/security/userauth-guidelines.md b/zh-cn/application-dev/security/userauth-guidelines.md index 6d0d5e6e72..d30a71e607 100644 --- a/zh-cn/application-dev/security/userauth-guidelines.md +++ b/zh-cn/application-dev/security/userauth-guidelines.md @@ -68,7 +68,7 @@ userIAM_userAuth模块提供了用户认证的相关方法,包括检测认证 try { console.info("auth onResult result = " + result); console.info("auth onResult extraInfo = " + JSON.stringify(extraInfo)); - if (result == 'SUCCESS') { + if (result == userIAM_userAuth.ResultCode.SUCCESS) { // 此处添加认证成功逻辑 } else { // 此处添加认证失败逻辑 diff --git a/zh-cn/device-dev/driver/driver-peripherals-face_auth-des.md b/zh-cn/device-dev/driver/driver-peripherals-face_auth-des.md index 5118cc2020..313286f1b4 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-face_auth-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-face_auth-des.md @@ -438,7 +438,7 @@ export default { try { console.info("auth onResult result = " + result); console.info("auth onResult extraInfo = " + JSON.stringify(extraInfo)); - if (result == 'SUCCESS') { + if (result == userIAM_userAuth.ResultCode.SUCCESS) { // 此处添加认证成功逻辑 } else { // 此处添加认证失败逻辑 @@ -473,7 +473,7 @@ export default { } }); let cancelCode = this.auth.cancel(contextId); - if (cancelCode == userIAM_userAuth.Result.SUCCESS) { + if (cancelCode == userIAM_userAuth.ResultCode.SUCCESS) { console.info("cancel auth success"); } else { console.error("cancel auth fail"); -- GitLab