|
@@ -227,22 +227,8 @@
|
|
|
if (value === '') {
|
|
if (value === '') {
|
|
|
this.checkMobile = false
|
|
this.checkMobile = false
|
|
|
} else {
|
|
} else {
|
|
|
- if (this.fastLogin.mobile !== '') {
|
|
|
|
|
- // 判断手机号是否已被注册
|
|
|
|
|
- this.$http.get(`/api/user/checkMobile`, {params: {mobile: this.fastLogin.mobile}})
|
|
|
|
|
- .then(response => {
|
|
|
|
|
- if (response.data.hasRegister) {
|
|
|
|
|
- this.checkMobile = true
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error('手机号未注册,请先注册!')
|
|
|
|
|
- this.checkMobile = false
|
|
|
|
|
- return Promise.reject(response.data)
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- this.$message.error(err.errMsg)
|
|
|
|
|
- })
|
|
|
|
|
- callback()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.checkMobile = true
|
|
|
|
|
+ callback()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
var validateCode = (rule, value, callback) => {
|
|
var validateCode = (rule, value, callback) => {
|
|
@@ -622,6 +608,7 @@
|
|
|
// 获取校验码
|
|
// 获取校验码
|
|
|
getCheckCode () {
|
|
getCheckCode () {
|
|
|
this.isShowLoading = true
|
|
this.isShowLoading = true
|
|
|
|
|
+ console.log(111)
|
|
|
if (!this.fastLogin.mobile) {
|
|
if (!this.fastLogin.mobile) {
|
|
|
this.isShowLoading = false
|
|
this.isShowLoading = false
|
|
|
this.$message.error('请先填写手机号')
|
|
this.$message.error('请先填写手机号')
|
|
@@ -631,8 +618,8 @@
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
this.isShowLoading = false
|
|
|
if (response.data) {
|
|
if (response.data) {
|
|
|
- this.token = response.data.content.token
|
|
|
|
|
- if (this.token !== '') {
|
|
|
|
|
|
|
+ if (response.data.success) {
|
|
|
|
|
+ this.token = response.data.content.token
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: '验证码已经发送到您的手机,请注意查收',
|
|
message: '验证码已经发送到您的手机,请注意查收',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
@@ -646,6 +633,8 @@
|
|
|
clearInterval(loginTime)
|
|
clearInterval(loginTime)
|
|
|
}
|
|
}
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(response.data.errMsg)
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
return Promise.reject(response.data)
|