|
@@ -62,7 +62,24 @@
|
|
|
this.downToast('请填写验证码信息')
|
|
this.downToast('请填写验证码信息')
|
|
|
this.state.token = 'error'
|
|
this.state.token = 'error'
|
|
|
} else {
|
|
} else {
|
|
|
- this.state.token = 'success'
|
|
|
|
|
|
|
+ let param = new FormData()
|
|
|
|
|
+ param.append('mobile', this.info)
|
|
|
|
|
+ param.append('code', this.token)
|
|
|
|
|
+ param.append('token', this.tokenCode)
|
|
|
|
|
+ let config = {
|
|
|
|
|
+ headers: {'Content-Type': 'multipart/form-data'}
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$http.post(`/update/user/checkCode/mobile`, param, config)
|
|
|
|
|
+ .then(response => {
|
|
|
|
|
+ if (response.data.success) {
|
|
|
|
|
+ this.state.token = 'success'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.state.token = 'error'
|
|
|
|
|
+ return Promise.reject(response.data)
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.downToast(err.errMsg)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 获取验证码
|
|
// 获取验证码
|
|
@@ -72,11 +89,12 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.$indicator.open('获取中...')
|
|
this.$indicator.open('获取中...')
|
|
|
let _this = this
|
|
let _this = this
|
|
|
- this.$http.get('/sso/personal/register/checkCode', {params: {mobile: this.info}})
|
|
|
|
|
|
|
+ this.$http.get('/update/user/check/mobile', {params: {mobile: this.info}})
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
this.$indicator.close()
|
|
this.$indicator.close()
|
|
|
if (response.data) {
|
|
if (response.data) {
|
|
|
- this.tokenCode = response.data.token
|
|
|
|
|
|
|
+ console.log('token', response.data.content.token)
|
|
|
|
|
+ this.tokenCode = response.data.content.token
|
|
|
this.$toast({
|
|
this.$toast({
|
|
|
message: '验证码已经发送到您的手机,请注意查收',
|
|
message: '验证码已经发送到您的手机,请注意查收',
|
|
|
iconClass: 'el-icon-success'
|
|
iconClass: 'el-icon-success'
|
|
@@ -93,9 +111,9 @@
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
}
|
|
}
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
- this.$indicator.close()
|
|
|
|
|
- this.downToast('请检查网络是否正常或联系服务商')
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$indicator.close()
|
|
|
|
|
+ this.downToast('请检查网络是否正常或联系服务商')
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 验证信息
|
|
// 验证信息
|
|
@@ -105,24 +123,26 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.$indicator.open('验证过程中...')
|
|
this.$indicator.open('验证过程中...')
|
|
|
let param = new FormData()
|
|
let param = new FormData()
|
|
|
|
|
+ param.append('mobile', this.info)
|
|
|
param.append('code', this.token)
|
|
param.append('code', this.token)
|
|
|
param.append('token', this.tokenCode)
|
|
param.append('token', this.tokenCode)
|
|
|
let config = {
|
|
let config = {
|
|
|
headers: {'Content-Type': 'multipart/form-data'}
|
|
headers: {'Content-Type': 'multipart/form-data'}
|
|
|
}
|
|
}
|
|
|
- this.$http.post('/sso/resetPwd/check/mobile', param, config)
|
|
|
|
|
|
|
+ this.$http.post('/update/user/check/mobile', param, config)
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
this.$indicator.close()
|
|
this.$indicator.close()
|
|
|
if (response.data.success) {
|
|
if (response.data.success) {
|
|
|
- this.$emit('stepEvent', 'security')
|
|
|
|
|
|
|
+ console.log('123', response.data)
|
|
|
|
|
+ this.$emit('stepEvent', 'new')
|
|
|
this.$emit('tokenEvent', response.data.content.token)
|
|
this.$emit('tokenEvent', response.data.content.token)
|
|
|
} else {
|
|
} else {
|
|
|
this.downToast(response.data.errMsg)
|
|
this.downToast(response.data.errMsg)
|
|
|
}
|
|
}
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
- this.$indicator.close()
|
|
|
|
|
- this.downToast('请检查网络是否正常或联系服务商')
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$indicator.close()
|
|
|
|
|
+ this.downToast('请检查网络是否正常或联系服务商')
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|