diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index d5088ea48..0673cbc1d 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -143,12 +143,16 @@ SMS_TEST_PHONE = CONFIG.SMS_TEST_PHONE # Alibaba ALIBABA_ACCESS_KEY_ID = CONFIG.ALIBABA_ACCESS_KEY_ID ALIBABA_ACCESS_KEY_SECRET = CONFIG.ALIBABA_ACCESS_KEY_SECRET +ALIBABA_VERIFY_SIGN_NAME = CONFIG.ALIBABA_VERIFY_SIGN_NAME +ALIBABA_VERIFY_TEMPLATE_CODE = CONFIG.ALIBABA_VERIFY_TEMPLATE_CODE ALIBABA_SMS_SIGN_AND_TEMPLATES = CONFIG.ALIBABA_SMS_SIGN_AND_TEMPLATES # TENCENT TENCENT_SECRET_ID = CONFIG.TENCENT_SECRET_ID TENCENT_SECRET_KEY = CONFIG.TENCENT_SECRET_KEY TENCENT_SDKAPPID = CONFIG.TENCENT_SDKAPPID +TENCENT_VERIFY_SIGN_NAME = CONFIG.TENCENT_VERIFY_SIGN_NAME +TENCENT_VERIFY_TEMPLATE_CODE = CONFIG.TENCENT_VERIFY_TEMPLATE_CODE TENCENT_SMS_SIGN_AND_TEMPLATES = CONFIG.TENCENT_SMS_SIGN_AND_TEMPLATES # 公告 diff --git a/apps/templates/_mfa_login_field.html b/apps/templates/_mfa_login_field.html index 52918acfd..8aa3cbdd6 100644 --- a/apps/templates/_mfa_login_field.html +++ b/apps/templates/_mfa_login_field.html @@ -75,18 +75,19 @@ } $('.input-style').each(function (i, ele){ - $(ele).attr('name', '') + $(ele).attr('name', 'code-test') }) const currentMFAInputRef = $('#mfa-' + name + ' .input-style') - currentMFAInputRef.attr('name', 'code').attr('required', true) + currentMFAInputRef.attr('name', 'code') // 登录页时,不应该默认focus const usernameRef = $('input[name="username"]') if (!usernameRef || usernameRef.length === 0) { - currentMFAInputRef.focus() + setTimeout(() => { + currentMFAInputRef.focus() + }) } - currentMFAInputRef.attr('name', 'code') } function sendChallengeCode(currentBtn) { @@ -127,4 +128,4 @@ flash_message: false }) } - \ No newline at end of file +