- updated SendReq

- If Server Down the login msg error corrected.
This commit is contained in:
Paolo Arena
2019-02-06 18:47:54 +01:00
parent cb941568e2
commit cb62d46048
11 changed files with 278 additions and 190 deletions

View File

@@ -124,11 +124,16 @@ export default class Signup extends Vue {
}
checkErrors(riscode: number) {
// console.log("RIS = " + riscode);
console.log('checkErrors', riscode)
if (riscode === rescodes.DUPLICATE_EMAIL_ID) {
this.showNotif(this.$t('reg.err.duplicate_email'))
} else if (riscode === rescodes.DUPLICATE_USERNAME_ID) {
this.showNotif(this.$t('reg.err.duplicate_username'))
} else if (riscode === rescodes.ERR_SERVERFETCH) {
this.showNotif(this.$t('fetch.errore_server'))
} else if (riscode === rescodes.ERR_GENERICO) {
let msg = this.$t('fetch.errore_generico') + UserStore.mutations.getMsgError(riscode)
this.showNotif(msg)
} else if (riscode === rescodes.OK) {
this.$router.push('/signin')
this.showNotif({type: 'warning', textColor: 'black', message: this.$t('components.authentication.email_verification.link_sent')})
@@ -136,6 +141,8 @@ export default class Signup extends Vue {
this.showNotif('Errore num ' + riscode)
}
}
public submitOk() {