From 26a60d45aac9bc7e84a6eb32d19e2ed2885b944a Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 15 Nov 2022 21:13:47 +0800 Subject: [PATCH] Revert "fix: captcha required error" This reverts commit e8f4a74cc276facc6c2a8f7c488a8683a21ae87c. --- .../uni-id-co/module/account/reset-pwd-by-email.js | 5 ----- .../uni-id-co/module/account/reset-pwd-by-sms.js | 5 ----- .../cloudfunctions/uni-id-co/module/login/login-by-sms.js | 8 -------- .../cloudfunctions/uni-id-co/module/login/login.js | 5 ----- .../uni-id-co/module/relate/bind-mobile-by-sms.js | 8 -------- 5 files changed, 31 deletions(-) diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js index c6aa924..7b6ae91 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-email.js @@ -52,11 +52,6 @@ module.exports = async function (params = {}) { type: LOG_TYPE.RESET_PWD_BY_EMAIL }) if (needCaptcha) { - if (!captcha) { - throw { - errCode: ERROR.CAPTCHA_REQUIRED - } - } await verifyCaptcha.call(this, { captcha, scene: CAPTCHA_SCENE.RESET_PWD_BY_EMAIL diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js index cda821a..05e68bf 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/account/reset-pwd-by-sms.js @@ -52,11 +52,6 @@ module.exports = async function (params = {}) { type: LOG_TYPE.RESET_PWD_BY_SMS }) if (needCaptcha) { - if (!captcha) { - throw { - errCode: ERROR.CAPTCHA_REQUIRED - } - } await verifyCaptcha.call(this, { captcha, scene: CAPTCHA_SCENE.RESET_PWD_BY_SMS diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js index 419c7cc..8f9aeaf 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-sms.js @@ -14,9 +14,6 @@ const { SMS_SCENE, LOG_TYPE } = require('../../common/constants') -const { - ERROR -} = require('../../common/error') /** * 短信验证码登录 @@ -54,11 +51,6 @@ module.exports = async function (params = {}) { }) if (needCaptcha) { - if (!captcha) { - throw { - errCode: ERROR.CAPTCHA_REQUIRED - } - } await verifyCaptcha.call(this, { captcha, scene: CAPTCHA_SCENE.LOGIN_BY_SMS diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js index 396ec80..97e9cfe 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login.js @@ -71,11 +71,6 @@ module.exports = async function (params = {}) { email }) if (needCaptcha) { - if (!captcha) { - throw { - errCode: ERROR.CAPTCHA_REQUIRED - } - } await verifyCaptcha.call(this, { captcha, scene: CAPTCHA_SCENE.LOGIN_BY_PWD diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js index 12c2a67..2275b05 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/relate/bind-mobile-by-sms.js @@ -14,9 +14,6 @@ const { preBind, postBind } = require('../../lib/utils/relate') -const { - ERROR -} = require('../../common/error') /** * 通过短信验证码绑定手机号 @@ -50,11 +47,6 @@ module.exports = async function (params = {}) { type: LOG_TYPE.BIND_MOBILE }) if (needCaptcha) { - if (!captcha) { - throw { - errCode: ERROR.CAPTCHA_REQUIRED - } - } await verifyCaptcha.call(this, { captcha, scene: CAPTCHA_SCENE.BIND_MOBILE_BY_SMS -- GitLab