mirror of https://github.com/jumpserver/jumpserver
fix: 修复 mfa 登录时的 focus 错误
parent
d2df8acd84
commit
70e8a03888
|
@ -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
|
||||
|
||||
# 公告
|
||||
|
|
|
@ -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
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue