| | |
| | | import { Vue, Component , namespace } from 'nuxt-property-decorator'; |
| | | import { AxiosError } from 'axios'; |
| | | import { Role } from '~/shared/models/enum/role'; |
| | | import ErrorMessageBox from '~/shared/errorService'; |
| | | import messageBoxService from '~/shared/services/message-box.service'; |
| | | import loginService from '~/shared/services/login.service' |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | |
| | | } |
| | | |
| | | public sendInfo():void{ |
| | | this.isAlreadyDone ? this.verify() : ErrorMessageBox('請確認帳號、密碼以及驗證碼是否填寫完畢'); |
| | | this.isAlreadyDone ? this.verify() : messageBoxService.showErrorMessage('請確認帳號、密碼以及驗證碼是否填寫完畢'); |
| | | } |
| | | |
| | | |
| | |
| | | }else{ |
| | | this.clearValue(); |
| | | this.regenerateImgOfVerification(); |
| | | ErrorMessageBox('驗證碼輸入錯誤'); |
| | | messageBoxService.showErrorMessage('驗證碼輸入錯誤'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | switch (error.response.status) { |
| | | case 401: |
| | | const errorMsg = error.response.data.detail; |
| | | ErrorMessageBox(errorMsg); |
| | | messageBoxService.showErrorMessage(errorMsg); |
| | | break; |
| | | |
| | | default: |
| | | ErrorMessageBox('',error); |
| | | messageBoxService.showErrorMessage('',error); |
| | | break; |
| | | } |
| | | } |