|
|
@@ -23,7 +23,7 @@
|
|
23
|
23
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
24
|
24
|
</el-input>
|
|
25
|
25
|
</el-form-item>
|
|
26
|
|
- <el-form-item prop="code" v-if="captchaOnOff">
|
|
|
26
|
+ <el-form-item prop="code" v-if="captchaEnabled">
|
|
27
|
27
|
<el-input
|
|
28
|
28
|
v-model="loginForm.code"
|
|
29
|
29
|
auto-complete="off"
|
|
|
@@ -89,7 +89,7 @@ export default {
|
|
89
|
89
|
},
|
|
90
|
90
|
loading: false,
|
|
91
|
91
|
// 验证码开关
|
|
92
|
|
- captchaOnOff: true,
|
|
|
92
|
+ captchaEnabled: true,
|
|
93
|
93
|
// 注册开关
|
|
94
|
94
|
register: false,
|
|
95
|
95
|
redirect: undefined
|
|
|
@@ -110,8 +110,8 @@ export default {
|
|
110
|
110
|
methods: {
|
|
111
|
111
|
getCode() {
|
|
112
|
112
|
getCodeImg().then(res => {
|
|
113
|
|
- this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
|
|
114
|
|
- if (this.captchaOnOff) {
|
|
|
113
|
+ this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
|
|
114
|
+ if (this.captchaEnabled) {
|
|
115
|
115
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
|
116
|
116
|
this.loginForm.uuid = res.uuid;
|
|
117
|
117
|
}
|
|
|
@@ -144,7 +144,7 @@ export default {
|
|
144
|
144
|
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
|
145
|
145
|
}).catch(() => {
|
|
146
|
146
|
this.loading = false;
|
|
147
|
|
- if (this.captchaOnOff) {
|
|
|
147
|
+ if (this.captchaEnabled) {
|
|
148
|
148
|
this.getCode();
|
|
149
|
149
|
}
|
|
150
|
150
|
});
|