From 9458276ad1b0f33cd8b491c3c007d35a76141c2a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 6 Sep 2023 08:30:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9F=AD=E4=BF=A1=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84=E5=85=A8=E5=B1=80=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/utils/sms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/utils/sms.py b/apps/utils/sms.py index 9d70a665..0fdd69ae 100644 --- a/apps/utils/sms.py +++ b/apps/utils/sms.py @@ -11,6 +11,8 @@ myLogger = logging.getLogger('log') @auto_log(name='阿里云短信', raise_exception=True, send_mail=True) def send_sms(phone: str, template_code: int, template_param: dict): config = get_sysconfig() + if config['sms'].get('enabled', True) is False: + return client = AcsClient(config['sms']['xn_key'], config['sms']['xn_secret'], 'default') request = CommonRequest() # 固定json