【更新】修改登录验证码与参数校验顺序

This commit is contained in:
俞宝山 2021-01-22 16:34:54 +08:00 committed by 小诺
parent 63c2e4717b
commit 28b66269dd

View File

@ -210,13 +210,13 @@ export default {
}
validateFields(validateFieldsKey, { force: true }, (err, values) => {
this.loginParams = values
//
if (this.captchaOpen) {
this.$refs.verify.show()
state.loginBtn = false
return
}
if (!err) {
//
if (this.captchaOpen) {
this.$refs.verify.show()
state.loginBtn = false
return
}
const loginParams = { ...values }
delete loginParams.account
loginParams[!state.loginType ? 'email' : 'account'] = values.account