mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
fix: don't trigger countdown if failed to send verification code (#815)
* feat: add countdown when no captcha provider found * fix: add countdown when sent code successfully
This commit is contained in:
@ -69,7 +69,11 @@ export const CountDownInput = (props) => {
|
|||||||
const loadCaptcha = () => {
|
const loadCaptcha = () => {
|
||||||
UserBackend.getCaptcha("admin", authConfig.appName, false).then(res => {
|
UserBackend.getCaptcha("admin", authConfig.appName, false).then(res => {
|
||||||
if (res.type === "none") {
|
if (res.type === "none") {
|
||||||
UserBackend.sendCode("none", "", "", ...onButtonClickArgs);
|
UserBackend.sendCode("none", "", "", ...onButtonClickArgs).then(res => {
|
||||||
|
if (res) {
|
||||||
|
handleCountDown(60);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (res.type === "Default") {
|
} else if (res.type === "Default") {
|
||||||
setCheckId(res.captchaId);
|
setCheckId(res.captchaId);
|
||||||
setCaptchaImg(res.captchaImage);
|
setCaptchaImg(res.captchaImage);
|
||||||
|
Reference in New Issue
Block a user