| | |
| | | export default class ConsultantLogin extends Vue { |
| | | @roleStorage.Mutation storageIdToken!: (token: string) => void; |
| | | @roleStorage.Mutation storageRole!: (role: string) => void; |
| | | |
| | | @roleStorage.Mutation storageConsultantId!:(id:string) => void; |
| | | isRememberUserName = false; |
| | | isShowPassword = false; |
| | | imgSrc = ''; |
| | |
| | | logInToConsultant(this.consultantDto).then(res => { |
| | | this.storageIdToken(res.data.id_token); |
| | | this.storageRole(Role.ADMIN); |
| | | this.storageConsultantId(this.consultantDto.username) |
| | | this.storeUserName(); |
| | | this.$router.push('/myAppointmentList/appointmentList'); |
| | | }).catch((error:AxiosError)=>{ |
| | |
| | | const errorMsg = error.response.data.detail; |
| | | ErrorMessageBox(errorMsg); |
| | | break; |
| | | |
| | | default: |
| | | ErrorMessageBox(); |
| | | ErrorMessageBox('',error); |
| | | break; |
| | | } |
| | | } |