mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 13:43:51 +08:00
fixed: 手机号登录验证码校验,及其后端逻辑校验逻辑修改
This commit is contained in:
parent
07848a6058
commit
fbb4bd32c1
@ -158,6 +158,7 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
if (!this.loginForm.smsCode || this.loginForm.smsCode.length !== 4) {
|
if (!this.loginForm.smsCode || this.loginForm.smsCode.length !== 4) {
|
||||||
this.$message.error('验证码不合法')
|
this.$message.error('验证码不合法')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
this.$store.dispatch('MobileLogin', this.loginForm).then(() => {
|
this.$store.dispatch('MobileLogin', this.loginForm).then(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@ -176,11 +177,12 @@
|
|||||||
url: '/admin/smsCode/' + this.loginForm.mobile,
|
url: '/admin/smsCode/' + this.loginForm.mobile,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.data) {
|
console.log(response)
|
||||||
|
if (response.data.data) {
|
||||||
this.timer()
|
this.timer()
|
||||||
this.$message.success('验证码发送成功')
|
this.$message.success('验证码发送成功')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('验证码发送失败')
|
this.$message.error(response.data.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user