This commit is contained in:
saeid
2019-05-06 21:48:46 +04:30
parent 5d8500dafd
commit f6d7277ddc
14 changed files with 268 additions and 168 deletions
+6 -3
View File
@@ -80,11 +80,14 @@ export default {
...mapActions('auth', [
'login'
]),
handleSubmit() {
async handleSubmit() {
// Perform a simple validation that cell_number and password have been typed in
if (this.$refs.form.validate()) {
this.login({cell_number: this.cell_number, password: this.password});
this.password = "";
const response = await this.login({cell_number: this.cell_number, password: this.password});
if (!response.status || response.status !== 200) {
this.password = "";
}
}
}
}