Skip to content

Commit

Permalink
fix(用户登录): 用户登录验证码判断
Browse files Browse the repository at this point in the history
未开启验证码时判断getCodeImg方法

fix #210
  • Loading branch information
Lind-pro committed Sep 23, 2020
1 parent a2982c6 commit 29d2b30
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/user/login2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ const Login: React.FC<Props> = props => {
};

const getCodeImg = () => {
service.getCaptcha().subscribe((resp) => {
setCaptcha(resp.key);
setCaptchaImg(resp.base64);
});
if (enable) {
service.getCaptcha().subscribe((resp) => {
setCaptcha(resp.key);
setCaptchaImg(resp.base64);
});
}
}

useEffect(() => {
Expand Down

0 comments on commit 29d2b30

Please sign in to comment.