From bcaeeb55d2caccae61407f1d6dc01d2cd0bd5cb4 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Thu, 12 Mar 2020 14:46:24 +0800 Subject: [PATCH] Fix: loading captcha in first load --- src/component/Login/LoginForm.js | 2 +- src/component/Login/Register.js | 2 +- src/component/Login/Reset.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/component/Login/LoginForm.js b/src/component/Login/LoginForm.js index 792af5b..fb0249b 100644 --- a/src/component/Login/LoginForm.js +++ b/src/component/Login/LoginForm.js @@ -143,7 +143,7 @@ function LoginForm() { if (loginCaptcha) { refreshCaptcha(); } - }, [location]); + }, [location,loginCaptcha]); const authnLogin = e => { e.preventDefault(); diff --git a/src/component/Login/Register.js b/src/component/Login/Register.js index 0051604..c8b8148 100644 --- a/src/component/Login/Register.js +++ b/src/component/Login/Register.js @@ -165,7 +165,7 @@ function Register() { if (regCaptcha) { refreshCaptcha(); } - }, []); + }, [regCaptcha]); return (