优化:登录页获取验证码
parent
af5e917643
commit
9b77fc1982
|
@ -21,7 +21,7 @@ export default {
|
||||||
helpUrl: (state) => state.settings.helpUrl, // 帮助
|
helpUrl: (state) => state.settings.helpUrl, // 帮助
|
||||||
privacyUrl: (state) => state.settings.privacyUrl, // 隐私
|
privacyUrl: (state) => state.settings.privacyUrl, // 隐私
|
||||||
clauseUrl: (state) => state.settings.clauseUrl, // 条款
|
clauseUrl: (state) => state.settings.clauseUrl, // 条款
|
||||||
captchaState: (state) => state.settings.captchaState || true// 验证码
|
captchaState: (state) => state.settings.captchaState// 验证码
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeCreate () {
|
beforeCreate () {
|
||||||
|
@ -81,13 +81,13 @@ export default {
|
||||||
* 获取验证码
|
* 获取验证码
|
||||||
*/
|
*/
|
||||||
getCaptcha () {
|
getCaptcha () {
|
||||||
if (this.captchaState) {
|
console.log(2, this.captchaState, this.captchaState !== undefined)
|
||||||
api.getCaptcha().then((ret) => {
|
if (this.captchaState !== undefined && !this.captchaState) return
|
||||||
this.formLogin.captcha = null
|
api.getCaptcha().then((ret) => {
|
||||||
this.captchaKey = ret.data.key
|
this.formLogin.captcha = null
|
||||||
this.image_base = ret.data.image_base
|
this.captchaKey = ret.data.key
|
||||||
})
|
this.image_base = ret.data.image_base
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description 提交表单
|
* @description 提交表单
|
||||||
|
|
Loading…
Reference in New Issue