From 1937c10fe212ca64b6fbf3cb2f0602e9173462cb Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 27 Sep 2022 17:54:09 +0800 Subject: [PATCH] fix: send sms error --- .../uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js | 2 +- .../uniCloud/cloudfunctions/uni-id-co/package.json | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js index 1f45a70..21c70e9 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js @@ -45,7 +45,7 @@ async function sendSmsCode ({ action = this.t('verify-mobile') break } - const sceneConfig = smsConfig.scene || {} + const sceneConfig = (smsConfig.scene || {})[scene] || {} if (!templateId) { templateId = sceneConfig.templateId } diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json index ebce798..f918c26 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json @@ -13,5 +13,7 @@ "uni-id-common": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", "uni-open-bridge-common": "file:../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common" }, - "extensions": {} -} + "extensions": { + "uni-cloud-sms": {} + } +} \ No newline at end of file -- GitLab