|
|
@ -122,14 +122,15 @@ export default { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
this.loginForm.distinguish = Number(this.activeName); |
|
|
|
this.loginForm.distinguish = Number(this.activeName); |
|
|
|
this.$post(this.api.logins, this.loginForm).then(res => { |
|
|
|
this.$post(this.api.logins, this.loginForm).then(res => { |
|
|
|
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires); |
|
|
|
|
|
|
|
this.queryCustomer(); |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
if (res && res.status == 30001) { |
|
|
|
if (res && res.status == 30001) { |
|
|
|
this.phoneVisible = true; |
|
|
|
this.phoneVisible = true; |
|
|
|
} |
|
|
|
} |
|
|
|
this.getVerImg(); |
|
|
|
this.getVerImg(); |
|
|
|
this.loginForm.code = ""; |
|
|
|
this.loginForm.code = ""; |
|
|
|
|
|
|
|
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires); |
|
|
|
|
|
|
|
this.queryCustomer(); |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return util.errorMsg("请检查表单数据"); |
|
|
|
return util.errorMsg("请检查表单数据"); |
|
|
|