添加验证码

This commit is contained in:
chenchun
2022-09-18 16:46:31 +08:00
parent 2a8d436267
commit a64d493a29
3 changed files with 19 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ export function logout() {
// 获取验证码
export function getCodeImg() {
return request({
url: '/captchaImage',
url: '/account/captchaImage',
headers: {
isToken: false
},

View File

@@ -129,8 +129,8 @@ function getCode() {
getCodeImg().then(res => {
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (captchaEnabled.value) {
codeUrl.value = "data:image/gif;base64," + res.img;
loginForm.value.uuid = res.uuid;
codeUrl.value = "data:image/gif;base64," + res.data.img;
loginForm.value.uuid = res.data.uuid;
}
});
}
@@ -188,10 +188,13 @@ getCookie();
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 40px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}