|
@@ -79,7 +79,8 @@ export default {
|
|
|
username: "",
|
|
|
password: "",
|
|
|
rememberMe: false,
|
|
|
- code: ""
|
|
|
+ code: "",
|
|
|
+ uid: ""
|
|
|
},
|
|
|
loginRules: {
|
|
|
username: [
|
|
@@ -122,7 +123,8 @@ export default {
|
|
|
getCode().then(res => {
|
|
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
|
|
if (this.captchaEnabled) {
|
|
|
- this.codeUrl = "data:image/gif;base64," + res.data;
|
|
|
+ this.loginForm.uid = res.data.uid;
|
|
|
+ this.codeUrl = "data:image/gif;base64," + res.data.verifyCode;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -166,7 +168,7 @@ export default {
|
|
|
|
|
|
const pwd = encrypt(this.loginForm.password, this.publicKey)
|
|
|
|
|
|
- login(this.loginForm.username.trim(), pwd, this.loginForm.code).then(result => {
|
|
|
+ login(this.loginForm.username.trim(), pwd, this.loginForm.code, this.loginForm.uid).then(result => {
|
|
|
console.log(result);
|
|
|
// this.$router.push({ path: this.redirect || "/index" });
|
|
|
// this.$router.push("/index");
|